W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2018

[csswg-drafts] [css-values-4] inherit() function: like var() for parent value, for any property

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Tue, 03 Jul 2018 00:28:56 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-337705587-1530577735-sysbot+gh@w3.org>
LeaVerou has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values-4] inherit() function: like var() for parent value, for any property ==
We've declined numerous requests by authors to extend `var()` to arbitrary properties, due to the potential for cycles and how expensive cycle detection would be in the general case. However, providing a way to get the **inherited** value of any property does not cause cycles and still helps with a ton of use cases. 

Before I do the painful work of collecting a list of use cases, I wanted to see if something like this would be feasible at all, or if there are implementation issues I hadn't considered.

This would also solve issues like #2690 in one fell swoop, for any property, without the need to support percentages. It would just become `font-weight: calc(0.5 * inherit(font-weight));`

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2864 using your GitHub account
Received on Tuesday, 3 July 2018 00:29:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 3 July 2018 00:29:06 UTC