- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Fri, 2 Mar 2012 10:13:29 -0800
On Fri, Mar 2, 2012 at 10:03 AM, Kang-Hao (Kenny) Lu <kennyluck at csail.mit.edu> wrote: > (12/03/02 23:35), 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> > > On the other hand, why is it bad for browsers and the Web platform to > support @scoped on <link>? Because it's an additional feature that adds no power. 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. > I talked to Hixie on IRC[1] and he seems to think that there's no use > case for <style>@import</style> either. So, is the scenario here a valid > use case for <style>@import</style>? If it is, why is it bad to add > @scoped to <link> again when this solution is somewhat subtle and can be > only considered a hack? Hixie has odd views sometimes. ^_^ @import is just fine - it lets you modularize your files without having to change/add <link>s in all your documents. > The argument here is that I think <style>@import</style> might have > usability problem (and also you need more work if want to switch the > style. This could happen, for example, when the theme panel as described > in this use case is a <div> with a <select>.). A reader of html5doctor > had the same problem too[2] and I can certainly image other people being > confused by this. What usability problems are you suggesting? ~TJ
Received on Friday, 2 March 2012 10:13:29 UTC