Closed hgl closed 9 years ago
I implemented this before I decided to implement strict: false
. Hopefully this can be merged too so I don't have rebase and resolve conflicts.
Will update readme & changelog once you think it's good.
You should write README + CHANGELOG before coding, it helps thinking about how to implement. I will handle this since I am working on strict option.
I am renaming append
to appendVariables
to make this option clear
I usually understand the problem better when I write the actual code (e,g, that's how I realized preserve: "specified"
is a no-op). But sure, adding README + CHANGELOG can make better communication. Will do so next time.
I am renaming append to appendVariables
Sounds reasonable.
Btw, once strict: false
is implemented, I believe if (variable.resolved) { val = val[val.length - 1] }
can be changed to if (variable.resolved) { val = val[0] }
, since there won't be multiple computed values anymore.
NM, strict
and preserve
are separate options. I was wrong about using val[0]
.
After something contemplation, I decide to go with
preserve: "computed"
preserve: "computed"
only preserves the computed custom properties definitions and usages. There are nopreserve: "specified"
andpreserve: "all"
.append
appends the js defined custom properties to the root node, so the final computed values can be picked up by cssnext (for theextract
option)