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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>51172</bug_id>
          
          <creation_ts>2010-12-16 02:35:49 -0800</creation_ts>
          <short_desc>Implement @-webkit-document CSS rule for use in user stylesheets</short_desc>
          <delta_ts>2022-07-12 14:05:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>https://developer.mozilla.org/en/CSS/@-moz-document</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Mathias Bynens">mathias</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>hyatt</cc>
    
    <cc>jason.barnabe</cc>
    
    <cc>kenwfoyjr</cc>
    
    <cc>mathias</cc>
    
    <cc>mitz</cc>
    
    <cc>mkterra</cc>
    
    <cc>peter</cc>
    
    <cc>pf</cc>
    
    <cc>ronan</cc>
    
    <cc>syoichi</cc>
    
    <cc>tony</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>323087</commentid>
    <comment_count>0</comment_count>
    <who name="Mathias Bynens">mathias</who>
    <bug_when>2010-12-16 02:35:49 -0800</bug_when>
    <thetext>Something similar to @-moz-document &lt;https://developer.mozilla.org/en/CSS/@-moz-document&gt; would make it *much* easier to write and use custom user stylesheets.

Also see &lt;http://lists.w3.org/Archives/Public/www-style/2004Aug/0135&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>323336</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-12-16 12:04:00 -0800</bug_when>
    <thetext>Pasting from the provided URL:

The @-moz-document rule is a Gecko-specific at-rule that restricts the style rules contained within it based on the URL of the document. It is designed primarily for user style sheets.

@-moz-document url(http://www.w3.org/),  
               url-prefix(http://www.w3.org/Style/),  
               domain(mozilla.org)  
{  
  /* CSS rules here apply to: 
     + The page &quot;http://www.w3.org/&quot;. 
     + Any page whose URL begins with &quot;http://www.w3.org/Style/&quot; 
     + Any page whose URL&apos;s host is &quot;mozilla.org&quot; or ends with 
       &quot;.mozilla.org&quot; 
   */  
  
  /* make the above-mentioned pages really ugly */  
  body { color: purple; background: yellow; }  
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>323454</commentid>
    <comment_count>2</comment_count>
    <who name="">mkterra</who>
    <bug_when>2010-12-16 15:13:50 -0800</bug_when>
    <thetext>If at all possible, supporting @-moz-document itself would be vastly preferable.  That way, existing styles will work without users having to wait for updates, and authors won&apos;t have to maintain two superficially-different versions for Gecko and Webkit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>323635</commentid>
    <comment_count>3</comment_count>
    <who name="Peter Beverloo">peter</who>
    <bug_when>2010-12-17 00:39:27 -0800</bug_when>
    <thetext>They&apos;re called vendor prefixes for a reason. While it would indeed benefit convenience for using user-stylesheets, I&apos;d consider it a bad thing to support another vendor&apos;s prefix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>404443</commentid>
    <comment_count>4</comment_count>
    <who name="Ronan Jouchet">ronan</who>
    <bug_when>2011-05-16 06:25:35 -0700</bug_when>
    <thetext>FYI, someone created a userscript that partially does the job:
http://code.google.com/p/chromium/issues/detail?id=2393#c63

This doesn&apos;t mean this bug is fixed, but it can be used as a workaround in the meantime.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>462668</commentid>
    <comment_count>5</comment_count>
    <who name="Mathias Bynens">mathias</who>
    <bug_when>2011-09-06 11:05:57 -0700</bug_when>
    <thetext>This is now included in the CSS Conditional Rules Module Level 3 draft: http://www.w3.org/TR/css3-conditional/#at-document</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>528676</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-01-02 23:15:09 -0800</bug_when>
    <thetext>*** Bug 75456 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882544</commentid>
    <comment_count>7</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-12 14:05:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/96909164&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>