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

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

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Tue, 12 Mar 2019 20:31:03 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-472168791-1552422662-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.

There is no way to *just* prevent outside styles from "leaking in" that does not end up being functionally identical to Shadow DOM.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3547#issuecomment-472168791 using your GitHub account
Received on Tuesday, 12 March 2019 20:31:04 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:45 UTC