W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2019

Re: [csswg-drafts] [css-scoping] Please bring back scoped styles (#3547)

From: Benoît Rouleau via GitHub <sysbot+gh@w3.org>
Date: Wed, 13 Mar 2019 13:22:12 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-472419062-1552483331-sysbot+gh@w3.org>
> Note that your example would not do what you think it does; in addition to preventing any outside styles from leaking in, it also completely shuts down inheritance internally. That font-size and color you provide in that rule will only apply to direct text children of the element; if you use anything else (even an inline like em) the text inside will revert to the UA defaults.

Wait, is that really the case @tabatkins? I just tested in the two browsers that support `revert` (Safari and Firefox 67) and it didn't shut down inheritance at all. It also, however, did not prevent outside inherited styles such as `font-size` and `color` declared on a parent element from leaking in. Now I imagine it's possible the implementation is buggy, but that behavior kinda makes sense to me...?

-- 
GitHub Notification of comment by benface
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3547#issuecomment-472419062 using your GitHub account
Received on Wednesday, 13 March 2019 13:22:14 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:57 UTC