value-keyword-case for currentColor in non SVG CSS is breaking code
See original GitHub issueWhat steps are needed to reproduce the bug?
I have a CSS declaration like this:
.footer a {
color: currentColor;
}
which gets reported as value-keyword-case error.
What Stylelint configuration is needed to reproduce the bug?
{
"rules": {
"value-keyword-case": [ "lower", {
"ignoreProperties": [ "@font-stack", "font-family", "font" ]
} ]
}
}
How did you run Stylelint?
CLI via npx stylelint assets/css/
Which version of Stylelint are you using?
14.3.0
What did you expect to happen?
no warning or error because of the syntax correct value currentColor
What actually happened?
assets/css/…
4:19 ✖ Expected "currentColor" to be "currentcolor" value-keyword-case
When set to non camelCase, browser will not respect this value, which breaks the styling.
Does the bug relate to non-standard syntax?
No response
Proposal to fix the bug
The root of this issue may lay in #5849. Please take a closer look.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Understanding the currentColor Keyword in CSS - DigitalOcean
A super short post that tells you what the currentColor keyword is used for in CSS and how to make good use of...
Read more >SVG currentColor do not inherit from parent division when ...
I try to integrate a SVG from a CSS file with the following code: .circle:before { content: url('data:image/svg+xml;charset=UTF-8, ...
Read more >Making single color SVG icons work in dark mode - Hidde's blog
Using inline SVGs with currentColor fixed the issue. ... basically lets you tell a browser that your CSS supports dark modes and will...
Read more >Using inline SVGs in Vue components - Caleb Porzio
After writing a crazy hack to achieve this functionality I discover SVG offers this functionality out of the box with a property called:...
Read more >How to use SVGs in React | Sanity.io guide
This article will explore how to use SVG in React in three examples.
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 FreeTop 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
Top GitHub Comments
Closing as no further reports.
The recommendation is to use
currentcolor
from the CSS Level 4 spec.I’ve found the following:
currentColor
, but accepts both,currentColor
andcurrentcolor
,currentColor
,currentcolor
I think the spec is the most accurate, and browsers and IDEs need to catch up.