<?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>27677</bug_id>
          
          <creation_ts>2014-12-19 19:46:04 +0000</creation_ts>
          <short_desc>Standardise &quot;disabled&quot; attribute on &lt;link&gt; elements</short_desc>
          <delta_ts>2018-06-28 23:23:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Krinkle">krinklemail</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>d</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>repuestosrenault000</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>116565</commentid>
    <comment_count>0</comment_count>
    <who name="Krinkle">krinklemail</who>
    <bug_when>2014-12-19 19:46:04 +0000</bug_when>
    <thetext>The attribute would be like a typical boolean attribute and would affect the initially used value of the &quot;disabled&quot; flag of a stylesheet.[1][2]

[1] http://dev.w3.org/csswg/cssom/#concept-css-style-sheet-disabled-flag
[2] http://dev.w3.org/csswg/cssom/#dom-stylesheet-disabled

Documentation about the attribute at MDN:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled
&gt; Note: While there is no disabled attribute in the HTML standard, there
&gt; is a disabled attribute on the HTMLLinkElement DOM object.
&gt; 
&gt; The use of disabled as an HTML attribute is non-standard and only used
b&gt; y some browsers. Do not use it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116780</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2015-01-05 09:48:01 +0000</bug_when>
    <thetext>What&apos;s the use case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117719</commentid>
    <comment_count>2</comment_count>
    <who name="Krinkle">krinklemail</who>
    <bug_when>2015-02-06 05:55:02 +0000</bug_when>
    <thetext>The use case is the demo page of VisualEditor and OOjs UI (front-end libraries). They ship with two different themes, and also support LTR and RTL directions.

As such the HTML page has 4 stylesheets specified. One loaded by default, and the others toggled via dynamic JavaScript-powered interfaces. They were originally authored and tested locally in Firefox without checking whether they were standardised or supported cross-browser.

It naturally made sense for it to exist, but alas, they&apos;re non-standard and e.g. not implemented in Blink/Chromium. However Firefox did (which makes sense).

Similar to the disabled attribute on HTML input elements.

As work-around in our project we now do an overly complex abstraction where we add the stylesheets with javascript (thus often causing a flash of unstyled content due to the lack of a simple callback for stylesheets having been loaded).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117720</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2015-02-06 08:02:17 +0000</bug_when>
    <thetext>What is the difference from alternative stylesheets?

&lt;link rel=stylesheet href=A title=A&gt; &lt;!-- enabled --&gt;
&lt;link rel=&quot;alternate stylesheet&quot; href=B title=B&gt; &lt;!-- disabled --&gt;

You can then toggle between them in JS with .disabled or with .enabledStyleSheetForSet().

http://dev.w3.org/csswg/cssom/#dom-document-enablestylesheetsforset</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118293</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2015-03-04 19:26:34 +0000</bug_when>
    <thetext>If the use case is alternative style sheet sets, then yeah, the existing feature for alternative style sheet sets seems like the way to go. Alternatively, just don&apos;t put the &lt;link&gt; elements in the DOM until you need them.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>