[whatwg] A <link rel=stylesheet scoped> usecase

Ian Hickson ian at hixie.ch
Thu Nov 29 16:06:29 PST 2012


On Fri, 8 Jun 2012, Kang-Hao (Kenny) Lu wrote:
> (12/06/08 7:28), Ian Hickson wrote:
> > It still seems like a bit of an edge case, so I think it's ok for us 
> > to continue to rely on @import for this for now. But we should keep an 
> > eye out for how often people use this technique; if it is indeed 
> > something that comes up a lot, then introducing scoped="" on <link 
> > rel=stylesheet> would make sense.
> 
> (12/03/03 2:03), Kang-Hao (Kenny) Lu wrote:
> > A reader of html5doctor had the same problem too[1] and I can 
> > certainly image other people being confused by this.
> >
> > [1] http://html5doctor.com/the-scoped-attribute/#link
> 
> which I mentioned, Googling the string "html5 scoped @import" gives me 
> the following sites which mention this technique, even if there's only 
> one browser supporting the 'scoped' attribute at the moment: [2][3][4]
> 
> [2] http://www.codingforums.com/showthread.php?t=242411#postcount1154993
> [3] http://www.webdirections.org/blog/on-the-abominable-proposed-html5-scoped-attribute-for-style-elements/#comment-222761
> [4] http://www.peterrknight.com/loading-javascript-and-css-mid-page-html5-wordpress-passing-validation-part-1/

Yeah, that's fair enough.

Righ now I can't find any browsers that implement <style scoped>. Unless 
<link scoped> is preferred by vendors than <style scoped>, I'd rather get 
one implemented and proven to work before we add more, so I still haven't 
added <link scoped>. To make sure I don't forget about this, though, I've 
filed it as a bug and will mark it LATER.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20166

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list