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
Although this is a SCSS-specific feature, @kristerkarisuggested we support nested properties in declaration-property-value-no-unknown Stylelint CSS rule to avoid duplicate code and encourage code reusability.
The text was updated successfully, but these errors were encountered:
@pamelalozano16 Thanks for the request and for using the template.
It's unlikely we'll add support for nested properties to the built-in rule as we're focused on balancing support for modern CSS against the long-term maintenance of the project. The CSS language is constantly improving and growing, so we have to focus the time we have on supporting that.
We sometimes add secondary options, like ignoreAtRules: [], to help the stylelint-scss authors reuse code via stylelint.utils.checkAgainstRule. But this is only applicable when SCSS uses a standard construct, like custom at-rules e.g. @debug.
As nested properties are a non-standard construct, stylelint-scss authors will need to mirror the rule if they want to support them. Or they may, and I'm just throwing this out there, add a no-nested-properties rule to discourage their use.
Closing as we are unlikely to add support for non-standard syntax to the built-in rules and will continue to use the isStandardSyntax* utils to ignore them so that the rules are somewhat useful for language extensions.
What is the problem you're trying to solve?
Rule declaration-property-value-no-unknown doesn't work for SCSS nested properties. So
font-size: red;
raises an error, butfont: { size: red; }
does not.Demo here.
What solution would you like to see?
Although this is a SCSS-specific feature, @kristerkari suggested we support nested properties in
declaration-property-value-no-unknown
Stylelint CSS rule to avoid duplicate code and encourage code reusability.The text was updated successfully, but these errors were encountered: