element-queries-spec icon indicating copy to clipboard operation
element-queries-spec copied to clipboard

Enable SASS/SCSS support?

Open danifornells opened this issue 7 years ago • 1 comments

Hi Tommy, I am planning to use your awesome project, but I am wondering if it would be feasible to use SASS language, to take advantage of variables and mixins. In my oppinion, pre-processors like SASS are wide used on any size projects. The main compatibility problem between SASS and your project is the $ char in the meta-selectors. I made a test using underscore instead, and works perfectly. What's your oppinion?

wrong-input.eqcss.scss

$brand-color: #ff0000;
@element ".this-selector input" and (min-characters: 5) {
  $this { border-color: $brand-color; }
}

right-input.eqcss.scss

$brand-color: #ff0000;
@element ".this-selector input" and (min-characters: 5) {
  _this { border-color: $brand-color; }
}

output.eqcss

@element ".this-selector input" and (min-characters: 5) {
  _this { border-color: #ff0000; }
}

danifornells avatar Mar 03 '17 11:03 danifornells

I will move this discussion into https://github.com/eqcss/eqcss that seems the main repo. BTW, I accessed to this repo through the http://elementqueries.com/ site. If this is not the main repo, i suggest to update the site.

danifornells avatar Mar 03 '17 11:03 danifornells