W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2011

[whatwg] Why is @scoped required for <style> as flow content?

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Mon, 28 Mar 2011 08:23:39 +0300
Message-ID: <FE174BF2564E42AE8F8AF5C94DB6A9A2@JukanPC>
Boris Zbarsky wrote:

> If you can only affect _some_ parts of the <body> you should in fact
> be using <style scoped>, no?

No, because the parts might appear around the <body> so that you cannot use 
any wrapper that contains them all. It would be awkward to use copies of the 
same stylesheet in different <style scoped> attributes.

By the way, there are undoubtedly cases where you would want to use the same 
scoped stylesheet for different elements, e.g. for different <blockquote> 
elements quoting from the same source. Yet another reason for dropping 
<style scoped> in favor of an attribute referring to an external stylesheet.

> The use case for unscoped <style> outside <head> is if you have full
> control over the <body> but no control over <head>.

It is _a_ use case.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Sunday, 27 March 2011 22:23:39 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC