Open chrishoage opened 7 years ago
Given the following .stylelintrc.json https://gist.github.com/chrishoage/bdedf025288486050fd60535bd018c3e
.stylelintrc.json
And the following CSS
.planButton { @add-mixin truncate; display: inline-block; margin: 0 20px 20px; width: 240px; }
The output is this
.planButton { @add-mixin truncate ; display: inline-block; margin: 0 20px 20px; width: 240px; }
One expects stylefmt to not a) move the custom at-rule, and b) not add a space after truncate.
stylefmt
truncate
I was playing around with formatAtRules and the issue appears to be that formatAtRules doesn't handle unknown at-rules very well.
formatAtRules
Since PostCSS supports defining custom at-rules (postcss-mixins) stylefmt should respect custom at-rules and format them to the way postcss validates.
Given the following
.stylelintrc.json
https://gist.github.com/chrishoage/bdedf025288486050fd60535bd018c3eAnd the following CSS
The output is this
One expects
stylefmt
to not a) move the custom at-rule, and b) not add a space aftertruncate
.I was playing around with
formatAtRules
and the issue appears to be thatformatAtRules
doesn't handle unknown at-rules very well.Since PostCSS supports defining custom at-rules (postcss-mixins) stylefmt should respect custom at-rules and format them to the way postcss validates.