This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20294 - [Explainer]: Misleading claim around CSS resets
Summary: [Explainer]: Misleading claim around CSS resets
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: Macintosh MacOS X
: P2 trivial
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14949
  Show dependency treegraph
 
Reported: 2012-12-07 21:21 UTC by Nicolas Gallagher
Modified: 2013-05-28 00:06 UTC (History)
1 user (show)

See Also:


Attachments

Description Nicolas Gallagher 2012-12-07 21:21:32 UTC
"No more need for lengthy reset stylesheets!"

Minor point: it's not clear if this refers to the base styles commonly used by sites/apps or custom (attempts at) resets that might be used by contemporary JS-widgets that are expecting to live within a site/app.

Main point: having all the styles set to their initial values at the shadow boundary doesn't necessarily mean that some kind of reset/normalize/base won't continue to be used in order to zero out or normalize browser default styles.

Thanks
Comment 1 Dominic Cooney 2013-05-28 00:06:33 UTC
I removed that specific language--I guess it refers to "author reset stylesheets", but that is a novel concept, I think most web developers would take that to mean "browser reset stylesheets" which are of course still necessary.

So I engaged in some exposition pointing out that if you want maximum style isolation you'll turn off apply-author-styles and turn on reset-style-inheritance; it now reads:

"You can relax this boundary with the apply-author-styles attribute on the <template> element. With the attribute present, document's author styles start applying in the shadow DOM subtree.

Conversely, you can make the boundary even stronger by setting the reset-style-inheritance attribute on the <template> element. With the attribute present, all styles are reset to initial values at the shadow boundary.

If you omit apply-author-styles and set reset-style-inheritance you're back to a clean slate. Your element is insulated from the styles in the page—even inherited properties—and you can use a browser reset stylesheet to build up the exact style you want."

<https://dvcs.w3.org/hg/webcomponents/rev/0154dbb74713>