Forum Feature requests

HTML5 <style> scoped Attribute

Were are often compelled to accumulate fragments of existing (X)HTML documents into a single output document. If the formatting of these fragments is determined by a <style> element, it becomes difficult to integrate the styles into a single <style> element in the header of the output document.

A solution to this problem would be the scoped attribute of the HTML5 <style> element.

From its definition (
When present, it specifies that the styles only apply to this element's parent element and that element's child elements (not the entire document).

Could you please consider to add the scoped attribute to your roadmap :)

- - -

Makes sense. Do any browsers support this yet?
Sorry, no browser support at all !

But if this has to be done in a browser you could certainly place the content into an <iframe>, I guess. You can't do that in a document (especially if the content spans several pages), so this feature makes sense there!

- - -

One easy way to do this while you wait would be to set a unique ID on the root element of the XHTML fragment being included, then hook the stylesheet rules to said id.

John Haugeland is