<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24616</bug_id>
          
          <creation_ts>2014-02-11 01:33:27 +0000</creation_ts>
          <short_desc>[imports]: Stylesheets in imported documents should be loaded</short_desc>
          <delta_ts>2014-02-20 22:54:49 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>20683</blocked>
    
    <blocked>23170</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Morrita Hajime">morrita</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>adamk</cc>
    
    <cc>gkrizsanits</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>100235</commentid>
    <comment_count>0</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-02-11 01:33:27 +0000</bug_when>
    <thetext>This is a spin-off from Bug 23170.
Sharing defaultView could have big implication and may need better framework
on HTML side so that such a conceptulization can fit in the picture.

For the first cut, it might be better to cover which should be loaded
for imports feature-by-feature, instead of describing it in abstract way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100238</commentid>
    <comment_count>1</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-02-11 01:42:48 +0000</bug_when>
    <thetext>By the way, why should stylesheets be loaded?

It&apos;s because this allows script-supported CSS framework like Bootstrap
being an import. Also, UI framework can pack its default &quot;theme&quot; as an import
in addition to the script itself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100350</commentid>
    <comment_count>2</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-02-12 02:17:19 +0000</bug_when>
    <thetext>Working on this...
https://github.com/w3c/webcomponents/commit/99d0f1d8b1d6a993e811c8e9ea670396b783aff3

Turns out de-dup for stylesheet is tricky to define,
especially because there is a demand that wants to define
the order or appearance based on the position of &lt;link&gt; element.

Think about this example:

- index.html
  &lt;link&gt; - a.html
  &lt;style id=&quot;s0&quot;&gt;
  &lt;link&gt; - a.html

In this case, should styles in a.html win styles in s0?

If we styles in imports behave like scripts, it shouldn&apos;t and s0 should win
because a.html is already imported and second a.html is just skipped.

But style behaves differently in general.
For example, unlike &lt;script&gt;, DOM mutation matters for &lt;style&gt;.
If it is moved in different location, the order of the style changes.
So saying &quot;already imported&quot; doesn&apos;t provide good mental model.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101065</commentid>
    <comment_count>3</comment_count>
    <who name="Morrita Hajime">morrita</who>
    <bug_when>2014-02-20 22:54:49 +0000</bug_when>
    <thetext>Closing as it is dumped into the ToT [1].

We certainly need more polish though. I&apos;ll do it by filing finer-grained bugs (starting from Bug 24756), so that it makes the point clear.

[1] http://w3c.github.io/webcomponents/spec/imports/#style-imports</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>