- From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
- Date: Fri, 08 Jun 2012 09:44:34 +0800
- To: Ian Hickson <ian@hixie.ch>
- Cc: WHAT Working Group <whatwg@whatwg.org>, 张立理 <otakustay@gmail.com>
(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. I don't know if this counts as a lot or not, but besides (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] I haven't examine these use cases to see if they are counted "valid" or not, but I think it's unfair to say this is an edge case. [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/ > On Fri, 2 Mar 2012, Tab Atkins Jr. wrote: >> >> Do this instead: >> >> <div> >> <style scoped> >> @import "3rd-party-theme/user-published-20120302133702.css"; >> </style> >> <span class="keyword">function</span><span> class="identifier">test</span>... >> </div> > > That's a good workaround, but if the use case is something we want to > actually address, I think supporting <link> here makes sense too. A good portion of the use of <style scoped> would just be something like this, and I still don't see good reasons why <style scoped>@import "3rd-party-theme/user-published-20120302133702.css";</style> is preferable to <link scoped rel=stylesheet href=3rd-party-theme/user-published-20120302133702.css> when the later is clearly easier to think of (or otherwise Gray or the the reader of html5doctor wouldn't have asked this). Tab mentioned (12/03/03 2:13), Tab Atkins Jr. wrote: > As well, right now the *only* purpose of a <link> in the <body> is to > function as a hidden source of url-flavored data for Microdata, if you > find empty <a>s distasteful. but given that Microdata already breaks this tradition, I don't see how it is still relevant. Cheers, Kenny
Received on Friday, 8 June 2012 01:45:10 UTC