<?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>26195</bug_id>
          
          <creation_ts>2014-06-25 13:35:51 +0000</creation_ts>
          <short_desc>disallow comments in media queries in the &quot;media&quot; attribute</short_desc>
          <delta_ts>2014-09-29 16:40:03 +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>WONTFIX</resolution>
          
          <see_also>https://www.w3.org/Bugs/Public/show_bug.cgi?id=26196</see_also>
          <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="Michael[tm] Smith">mike</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>108318</commentid>
    <comment_count>0</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2014-06-25 13:35:51 +0000</bug_when>
    <thetext>Please consider making the spec state that media queries in the &quot;media&quot; attribute must not contain CSS comments. (In other words, that authors must not use comments in media queries in the &quot;media&quot; attribute.)

I can&apos;t think of any sane use cases for allowing CSS comments in there.

UAs would still need to support parsing of &quot;media&quot; values that contain comments but conformance checkers would report them as invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110786</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-08-29 21:06:36 +0000</bug_when>
    <thetext>If they work everywhere, what&apos;s the value of disallowing them?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112343</commentid>
    <comment_count>2</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2014-09-28 10:07:38 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #1)
&gt; If they work everywhere, what&apos;s the value of disallowing them?

The value is that there&apos;s no good reason for HTML attribute values to contain CSS comments, so just because HTML @media attribute parsers handle CSS comments, that doesn&apos;t mean we should implicitly encourage authors to use them. Postel&apos;s law and all that. We obviously have plenty of other examples in HTML where the document-conformance rules are stricter than the parsing rules.

But I don&apos;t feel strongly about it at this point. Feel free to wontfix this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112394</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-29 16:40:03 +0000</bug_when>
    <thetext>There&apos;s not really any good reason for media queries in general to have inline comments, but that&apos;s what the CSS specs allow. I think it&apos;s something we should leave up to the CSS side, rather than try to invent a new authoring syntax just for the media=&quot;&quot; attribute.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>