Re: [csswg-drafts] [css-inherit] New rule to make non-inherited properties inheritable (#4395)

This seems problematic to me. For example, the construction of the box tree creates various anonymous boxes. Currently it's not observable whether implementation really create such boxes or use alternative approaches, because selectors can't target anonymous boxes and inherited properties are safe enough. But if for example you make border inheritable, then you can see how many boxes are there.

Also, non-inherited properties are non-inherited because in most cases you don't want them to inherit. The nice thing of the `inherit` keyword is that the effect is restricted to the element in which you use it, it won't affect other elements unintentionally. But with your proposal, `.child` would inherit `50% !inherit`, so the effect would continue propagating to `.grandchild`, `.great-grandchild`, etc. This seems undesirable in most cases.

BTW, how would this fit in the cascade? E.g. which one wins here:
```css
.parent { border-radius: 50% !inherit; }
.child { border-radius: 10%; }
```
I guess it would be in https://drafts.csswg.org/css-cascade-4/#defaulting, right?

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

Received on Tuesday, 8 October 2019 14:55:15 UTC