matype / stylefmt

stylefmt is a tool that automatically formats stylesheets.
Other
2.1k stars 89 forks source link

Rules undesirably removing blank lines around @import rules #169

Closed ryanheathers closed 7 years ago

ryanheathers commented 8 years ago

My Sass file contains a number of @import rules. Stylefmt is undesirably removing any blank lines above/below these rules.

I'm using Stylelint's at-rule-empty-line-before rule and I've configured it to ignore @import rules, but it appears to have no effect on Stylefmt's processing. I saw there is an open issue related to support for that rule.

I believe the underlying cause may be related to this default Stylefmt rule: disallow any blank lines between @import

Is there any way to override this behavior currently while awaiting support for Stylefmt's at-rule-empty-line-before rule? Thanks!

iblack10 commented 8 years ago

This issue may have been fixed with https://github.com/morishitter/stylefmt/pull/194 which added partial support for "at-rule-empty-line-before".

ryanheathers commented 7 years ago

@iblack10 your PR fixed the issue for me, many thanks!

ryanheathers commented 7 years ago

I should note that this partial fix addresses the initial @import issue, but it causes other issues because it doesn't fully support all the except and ignore cases that the at-rule-empty-line-before provides. It'll be great when this rule is fully supported. Thanks for the work so far though!

iblack10 commented 7 years ago

No problem Ryan. I've actually added nearly all of the remaining functionality in pull request #213 so hopefully it can be accepted soon.