-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
Currently you use a title like
.root {
--text-color: red;
}
.component {
--text-color: blue;
}
.component .header {
color: var(--text-color);
}
.component .text {
--text-color: green;
color: var(--text-color);
}With the current html, this is completlly wrong
<div class="component">
Black
<div class="header">
Blue
<div class="text">
Green
<div class="header">Green</div>
</div>
</div>
</div>See native result on firefox http://jsbin.com/tireneluxo/1/edit?html,css,output
Your output give a completly different result
http://jsbin.com/zacakilamo/1/edit?html,css,output
It's unexpected according to what I can read in the readme https://github.com/MadLittleMods/postcss-css-variables#using-cascading-variables-the-var-notation
Using Cascading Variables: the var() notation
...
- No limitation on what scope CSS variables can be declared or used (:root or wherever)
- Proper value substition based on explicit DOM/structure traversal
So it's totally unclear.
Metadata
Metadata
Assignees
Labels
No labels