You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a .css file in a Jekyll site that's structured like this:
---
# this needs YAML front matter to be compile by Jekyll's Sass
---
@import'variables';
.blah {
color: $red;
}
Jekyll dutifully strips the front matter and passes the rest off to Sass, but both the sass CLI and scss-lint barf on it:
css/blah.scss:5: Invalid CSS after "...ort 'variables'": expected "{", was ";" (Sass::SyntaxError)
When I remove the front matter, sass and scss-lint are able to parse and lint it, but then Jekyll doesn't recognize it as a Sass stylesheet. So I keep the front matter and push it to github, but then Hound CI reports these errors as fatal when linting.
I wasn't able to find any solution to this by searching the issues or googling, but is this a known problem? Is there a workaround, or is the fix to have scss-lint strip front matter before sending it to Sass for parsing?
The text was updated successfully, but these errors were encountered:
Just FYI if you have this problem and all your stylesheets have the same number of frontmatter variables you can use preprocess_command: "sed '1,3d'", where 3 is the line upon which the "closing" --- is found.
Thought this might be useful to someone in the future.
I have a
.css
file in a Jekyll site that's structured like this:Jekyll dutifully strips the front matter and passes the rest off to Sass, but both the
sass
CLI andscss-lint
barf on it:When I remove the front matter,
sass
andscss-lint
are able to parse and lint it, but then Jekyll doesn't recognize it as a Sass stylesheet. So I keep the front matter and push it to github, but then Hound CI reports these errors as fatal when linting.I wasn't able to find any solution to this by searching the issues or googling, but is this a known problem? Is there a workaround, or is the fix to have scss-lint strip front matter before sending it to Sass for parsing?
The text was updated successfully, but these errors were encountered: