Rule idea: value-no-non-variable
See original GitHub issueInspired by #4
SCSS-lint (sorry to bring it up again; can’t help it, since it’s a functioning tool and the one seems the most popuar) has VariableForProperty rule. It does almost the same, except it forces the policy not on value types (like @davidtheclark proposed), but for property names and is more general.
I just thought that in the future users would want something similar to color-no-non-variable
, but for fonts and other types of values. Wouldn’t it be less redundant to make a general thing like value-no-non-variable
and make it accept an array of value types/property names?
As for checking those variables values, I think that is more of a Sass compiler’s job.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Rule Machine How To: Set a variable in one rule and use in ...
Here are the general steps to set a variable in Rule 1 and check its value in Rule 2. Go to Settings |...
Read more >Rules for assigning values to control variables (key-words)
1. Values are assigned to control variables by typing the name of the control variable (or enough of it to disambiguate it), an...
Read more >how to assign value to variable in business rules using a ...
how to assign value to variable in business rules using a function? ⏩ Post By ✓ Bukhtiar Ahmad ✓ Intersystems Developer Community ...
Read more >Rule variables - IBM
A rule variable is a name to which you assign a value. You define the variable in the definitions part of an action...
Read more >Need to set reference field value in variable set - ServiceNow
Hi, I need to set the value of a reference field that is part of a variable set using a business rule. I...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jeddy3, @dryoma This worked for me with regular SCSS:
It also ignores variable declarations.
Update 2022: https://github.com/stylelint-scss/stylelint-scss/issues/13#issuecomment-1218272125
TODO: Check out this plugin https://github.com/sh-waqar/stylelint-declaration-use-variable