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 12251 - The idea of limited-scope style elements is useful, but it causes compability issues. Current browsers ignore the scope attribute and apply the style to the entire document. It is probably better (safe) to ignore a style sheet that is meant to be scoped t
Summary: The idea of limited-scope style elements is useful, but it causes compability...
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-05 20:51 UTC by contributor
Modified: 2011-08-04 05:05 UTC (History)
8 users (show)

See Also:


Attachments

Description contributor 2011-03-05 20:51:54 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#the-style-element

Comment:
The idea of limited-scope style elements is useful, but it causes compability
issues. Current browsers ignore the scope attribute and apply the style to the
entire document. It is probably better (safe) to ignore a style sheet that is
meant to be scoped than to apply it globally. I propose that the scoped
attribute be removed and a new MIME type, say text/css-scoped, be defined. A
scoped style element would then be written as a normal style element, just
with a type attribute mentioning the new MIME type.

Posted from: 88.114.29.18
User agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fi; rv:1.9.2.14) Gecko/20110218 Firefox/3.6.14 ( .NET CLR 3.5.30729)
Comment 1 Julian Reschke 2011-03-05 21:09:32 UTC
Alternatively, maybe the current browser behavior should be fixed instead?
Comment 2 Tab Atkins Jr. 2011-03-05 22:59:41 UTC
Agreed with Julian.  Browsers should support @scoped, and in the meantime people shouldn't be using @scoped.
Comment 3 Ian 'Hixie' Hickson 2011-05-07 18:49:20 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: Until browsers support scoped="", there's a simple workaround to fix this: put an id="" on the <style> element's parent, and put #id in the front of every selector.
Comment 4 Michael[tm] Smith 2011-08-04 05:05:01 UTC
mass-moved component to LC1