Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 style scoped attribute gone in Chrome 36+?

<style scoped> was available in Chrome with experimental platform features enabled, until Chrome 36. (http://www.w3.org/TR/html51/document-metadata.html#attr-style-scoped)

It is gone with Chrome 37 (http://caniuse.com/#feat=style-scoped)

I believe to have read something a while ago, but could not find anything anymore. Have they removed it in favour of Shadow DOM?

Example at http://jsfiddle.net/tofu/xct0jo5u/ (working in FireFox, but not in Chrome with experimental web platform features enabled)

like image 859
eerne Avatar asked Sep 24 '14 08:09

eerne


People also ask

Is scope attribute supported in HTML5?

The HTML scoped attribute is a boolean attribute that is used to specify that the styles only apply to this element's parent element and that element's child elements (not the entire document). Note : It is a deprecated attribute and it is not supported by HTML5.

What is scoped CSS?

The :scope CSS pseudo-class represents elements that are a reference point for selectors to match against. /* Selects a scoped element */ :scope { background-color: lime; } Currently, when used in a stylesheet, :scope is the same as :root , since there is not at this time a way to explicitly establish a scoped element.


Video Answer


1 Answers

Yes, scoped stylesheets have been removed as of Chrome 35 according to the Chromium Dashboard:

http://www.chromestatus.com/features/5374137958662144

It was partially implemented behind a flag, but was later retracted due to high code complexity. http://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/scoped/blink-dev/R1x18ZLS5qQ/Bjuh_cENhlQJ

like image 128
CodingIntrigue Avatar answered Sep 22 '22 12:09

CodingIntrigue