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

> Could you elaborate a bit on the underlying storage/handling issue? How could it get in the way? Is it theoretical or are there existing examples of properties that would have issues?

I wrote that mostly concerning the implementation difficulties in mind, since we (in Stylo) use lots of different types to handle subtle differences between properties. But I realized that it is actually not a problem of types, but the differences themselves. For example, `word-spacing` and `letter-spacing` is almost the same except that the former accepts `<percentage>` in addition to `normal | <length>`. If any property can be referenced to any property, we would need a mechanism to extract only certain type of value, with either a fallback or just treating as invalid at computed-value time.

Such mechanism has its own issue, that supported type at a value position may depend on the context, and can change as CSS evolves. For example, there is plan to allow division between two dimensions, which may enable `<percentage>` being used in a property accepting only `<dimension>` as far as you divide it with another percentage. Also there is some idea about allowing `auto` in `calc` for some properties. Those kind of changes may affect above-mentioned mechanism.

> Also, by future-proofing, are you referring to implementation issues or author code?

For spec about how to handle it. Actually the above has something related to future-proofing already.

-- 
GitHub Notification of comment by upsuper
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2864#issuecomment-402044330 using your GitHub account

Received on Tuesday, 3 July 2018 07:44:47 UTC