<?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>14491</bug_id>
          
          <creation_ts>2011-10-18 12:45:08 +0000</creation_ts>
          <short_desc>&apos;script&apos; and &apos;style&apos; are not consistent. &apos;script&apos; have a &apos;src&apos; attribute, but &apos;style&apos; does not have a &apos;src&apos; attribute. If the &apos;script&apos; element is the cousin of &apos;style&apos;, then why doesn&apos;t both none of them have the src attribute? &apos;link&apos; is used to load styl</short_desc>
          <delta_ts>2011-10-24 14:41:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#top</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>cmhjones</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>webmaster</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>58337</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-10-18 12:45:08 +0000</bug_when>
    <thetext>Specification: http://dev.w3.org/html5/spec/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
&apos;script&apos; and &apos;style&apos; are not consistent.
&apos;script&apos; have a &apos;src&apos; attribute, but &apos;style&apos; does not have a &apos;src&apos; attribute.
If the &apos;script&apos; element is the cousin of &apos;style&apos;, then why doesn&apos;t both none
of them have the src attribute?

&apos;link&apos; is used to load style sheets, but not scripts.

Why is that you load CSS with link, but not JavaScript with link?
Both JavaScript and CSS are external resources and should be loaded in the
same way.

If scripts are loaded with the &apos;script&apos; element, then why are not style sheets
loaded with the &apos;style&apos; element?

== Consistent (Good) ==
&lt;script src=&quot;script.js&quot;&gt;
&lt;style src=&quot;style.css&quot;&gt;

== Consistent (Good) ==
&lt;link src=&quot;script.js&quot;&gt;
&lt;link src=&quot;style.css&quot;&gt;

== Inconsistent (Bad) ==
&lt;link src=&quot;script.js&quot;&gt;
&lt;style src=&quot;style.css&quot;&gt;

Posted from: 212.247.162.243
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58339</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-10-18 13:43:01 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: We can&apos;t change this now because deployed content depends on this being as it is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58343</commentid>
    <comment_count>2</comment_count>
    <who name="Cameron Jones">cmhjones</who>
    <bug_when>2011-10-18 13:57:07 +0000</bug_when>
    <thetext>Do you mean that there is deployed content that depends on style not having a &apos;src&apos; attribute? This addition provides the consistency which the bug author intends and is a new attribute so shouldn&apos;t affect currently deployed content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58714</commentid>
    <comment_count>3</comment_count>
    <who name="Lars Gunther">webmaster</who>
    <bug_when>2011-10-22 18:50:17 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Do you mean that there is deployed content that depends on style not having a
&gt; &apos;src&apos; attribute? This addition provides the consistency which the bug author
&gt; intends and is a new attribute so shouldn&apos;t affect currently deployed content.

There is a lot more to it than that. Where would such content fit in the cascade? 
And how would src-attribute provided content relate to styles provided within the HTML between the tags? Legacy browsers would ignore the src attribute an use thos rules, but that&apos;s very inconsistent compared to the script element that ignores the element content if a src attribute is provided.

And then there is the issue of polyfills. To write the in a way that ensures a propwer cascading order is nigh impossible.

This is actually a quite large addition to browser parsing algotithms for no benefit except purity of style, which is not really that valuable.

We can link to external stylesheets already. Use case solved and it is not THAT hard to learn how to do it. Trust me, I teach this to newbies for a living.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58746</commentid>
    <comment_count>4</comment_count>
    <who name="Cameron Jones">cmhjones</who>
    <bug_when>2011-10-24 14:41:25 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; There is a lot more to it than that. Where would such content fit in the
&gt; cascade? 
&gt; And how would src-attribute provided content relate to styles provided within
&gt; the HTML between the tags? Legacy browsers would ignore the src attribute an
&gt; use thos rules, but that&apos;s very inconsistent compared to the script element
&gt; that ignores the element content if a src attribute is provided.
&gt; 
&gt; And then there is the issue of polyfills. To write the in a way that ensures a
&gt; propwer cascading order is nigh impossible.
&gt; 
&gt; This is actually a quite large addition to browser parsing algotithms for no
&gt; benefit except purity of style, which is not really that valuable.
&gt; 
&gt; We can link to external stylesheets already. Use case solved and it is not THAT
&gt; hard to learn how to do it. Trust me, I teach this to newbies for a living.

Thanks for the clarity, i thought there might be some complexity in implementing this and with the addition of legacy browsers ignoring src references makes it practically impossible.

In a pie-in-the-sky world, i would love to see for style &amp; scripts to use the src attribute to reference an external document but the contents of the tags to be use for over-riding the imported context, ie:

&lt;style src=&quot;external-stylesheet.css&quot;&gt;
    h1 { color: red; } &lt;!-- over-ridden attribute --&gt;
&lt;/style&gt;


OR 

&lt;script src=&quot;external-script.js&quot;&gt;
    config.initParamA = &quot;1000&quot;;
    config.initParamB = &quot;yellow&quot;;
&lt;/script&gt;

So that you can almost have template imports and their configuration in the same place....ahh the pie in the sky!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>