<?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>20600</bug_id>
          
          <creation_ts>2013-01-08 13:39:32 +0000</creation_ts>
          <short_desc>[Shadow]: Custom Pseudo-Elements should follow the same convention as custom element names.</short_desc>
          <delta_ts>2014-04-09 21:34:09 +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>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>14978</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne">annevk</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>brunoaiss</cc>
    
    <cc>dbaron</cc>
    
    <cc>fantasai.bugs</cc>
    
    <cc>jackalmage</cc>
    
    <cc>pomax</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>81043</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-01-08 13:39:32 +0000</bug_when>
    <thetext>Can we please not enshrine the x- convention into web standards: http://tools.ietf.org/html/draft-saintandre-xdash-considered-harmful

Why not have something like ::shadow(identifier) instead?

Introducing specific parsing rules in CSS For ::x-... vs ::... seems very icky too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81049</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-01-08 15:47:20 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Can we please not enshrine the x- convention into web standards:
&gt; http://tools.ietf.org/html/draft-saintandre-xdash-considered-harmful

That&apos;s a completely different situation, right? &quot;x-&quot; in HTTP headers meant implementation-specific or experimental. &quot;x-&quot; means &quot;local semantics&quot; (as opposed to &quot;public semantics&quot;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81111</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-01-09 11:37:11 +0000</bug_when>
    <thetext>Having x- mean &quot;local semantics&quot; (whatever that is, like data-*?) rather than experimental (which it has always meant) seems kinda confusing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81136</commentid>
    <comment_count>3</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2013-01-09 18:30:22 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Having x- mean &quot;local semantics&quot; (whatever that is, like data-*?) rather
&gt; than experimental (which it has always meant) seems kinda confusing.

If you have a better suggestion that is similarly short, feel free to suggest something.

(It&apos;s a virtue that the prefix looks slightly ugly, as it makes it less likely that the elements will be overused for inappropriate purposes, like people inventing &quot;more semantic&quot; names for existing elements, but it can&apos;t be too long/ugly, or people might ignore the mechanism entirely.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81137</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-01-09 18:44:12 +0000</bug_when>
    <thetext>This is not about elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81142</commentid>
    <comment_count>5</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2013-01-09 19:14:46 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; This is not about elements.

Sorry, brain fart.  In that case, we&apos;d still like to avoid having something too inconvenient, but it&apos;s less of a problem.  I think we&apos;re using x- just because it parallels the element-name prefix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81143</commentid>
    <comment_count>6</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-01-09 19:17:51 +0000</bug_when>
    <thetext>BTW, I suggested using a function for this early on, but Hyatt was strongly against it (because WebKit and Gecko already have a de-facto standard using ::foo for matching elements in shadow trees). With that, we need _a_ prefix for separating author-defined pseudo-elements from those specified in CSS. As Tab said, &quot;x-&quot; is here just for consistency.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81144</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-01-09 19:39:24 +0000</bug_when>
    <thetext>Is hyatt okay with a prefix though? It seems either way you&apos;re changing the design he intended. Using a function seems much cleaner and there&apos;s much more precedent for that in CSS than prefixes. (CSS only has prefixes with a leading - and those are for proprietary extensions.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85061</commentid>
    <comment_count>8</comment_count>
    <who name="Mike Kamermans">pomax</who>
    <bug_when>2013-03-27 18:16:56 +0000</bug_when>
    <thetext>just speaking up as a normal user who will end up having to write CSS declarations for style hooking, &quot;x-&quot; is just a little nudge forward towards the mess that CSS has become =)

If a prefix is absolutely necessary, can it be made indicative of what it&apos;s for, like &quot;custom-&quot; or something, so that CSS keeps making sense to people who have to write/read it?

(I have no idea how to battle the syntax that lands in CSS left and right as just &quot;a person who has to write CSS&quot;; the style hook syntax involving adding +, for instance, makes perfect sense to me as a programmer, but as a user I hope never to have to use it because it just makes CSS less human-unreadable. So hopefully &quot;x-&quot; isn&apos;t kept as prefix, at least)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87390</commentid>
    <comment_count>9</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-05-07 22:34:20 +0000</bug_when>
    <thetext>Okay, custom elements shrugged the &quot;x-&quot; prefix and it may be time to do the same for custom pseudo elements. However, we can&apos;t go with just &quot;dashes-in-name&quot; constraint, since CSS already has a bunch of pseudo elements like that. What do you guys think about &quot;should start with a dash?&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87475</commentid>
    <comment_count>10</comment_count>
    <who name="Mike Kamermans">pomax</who>
    <bug_when>2013-05-09 01:49:33 +0000</bug_when>
    <thetext>I&apos;m not sure that would be a good idea. People are going to have to write and read these structures a lot, making pseudo elements start with a dash will not be pleasant. Given the established nature of CSS pseudo-selectors, would it make sense to go with dash-in-name anyway, and either leave the collision up to the client (with an application warning that an established pseudo-class is being redeclared, much like how an unknown CSS propertie will throw warnings in all modern browsers). This will even allow a graceful degradation where new pseudo-selectors are added to CSS, and sites that don&apos;t use them, but were already using their own now-name-colliding custom pseudo-elements now get a warning from the browser. The behaviour will be the same as before (the pseudo-element wins), but the site will do the same as it always did, and the maintainers can decide to either move with the times, or ignore the problem without loss of function =)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87500</commentid>
    <comment_count>11</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2013-05-09 17:24:19 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; I&apos;m not sure that would be a good idea. People are going to have to write
&gt; and read these structures a lot, making pseudo elements start with a dash
&gt; will not be pleasant. Given the established nature of CSS pseudo-selectors,
&gt; would it make sense to go with dash-in-name anyway, and either leave the
&gt; collision up to the client (with an application warning that an established
&gt; pseudo-class is being redeclared, much like how an unknown CSS propertie
&gt; will throw warnings in all modern browsers). This will even allow a graceful
&gt; degradation where new pseudo-selectors are added to CSS, and sites that
&gt; don&apos;t use them, but were already using their own now-name-colliding custom
&gt; pseudo-elements now get a warning from the browser. The behaviour will be
&gt; the same as before (the pseudo-element wins), but the site will do the same
&gt; as it always did, and the maintainers can decide to either move with the
&gt; times, or ignore the problem without loss of function =)

We prefer to avoid these kinds of &quot;graceful&quot; name collisions anyway, because it interferes with people trying to use the &quot;real&quot; versions as we add them in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87517</commentid>
    <comment_count>12</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-05-09 21:36:33 +0000</bug_when>
    <thetext>Added a warning for now: https://dvcs.w3.org/hg/webcomponents/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87518</commentid>
    <comment_count>13</comment_count>
    <who name="L. David Baron (Mozilla)">dbaron</who>
    <bug_when>2013-05-09 21:47:23 +0000</bug_when>
    <thetext>What about the issue of CSS implementations being required to drop selectors containing unknown pseudo-elements?  (Modulo some non-conforming implementations where this is red:
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0Abody%2C%20%3A%3Ax-foo%20%7B%20background%3A%20red%20%7D%0A%3C%2Fstyle%3E )

Exactly which pseudo-elements does this make considered to be known?

I agree a function would be a better solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90891</commentid>
    <comment_count>14</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-17 22:11:19 +0000</bug_when>
    <thetext>Latest proposal is to use part(foo). We&apos;ll just use that instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103620</commentid>
    <comment_count>15</comment_count>
    <who name="brunoais">brunoaiss</who>
    <bug_when>2014-04-09 18:27:49 +0000</bug_when>
    <thetext>Why not use namespacing-like way the same way xml does?

&lt;somenamespaceyoumakeup:shadowtag&gt;&lt;/somenamespaceyoumakeup:shadowtag&gt;

?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103621</commentid>
    <comment_count>16</comment_count>
    <who name="Mike Kamermans">pomax</who>
    <bug_when>2014-04-09 18:39:39 +0000</bug_when>
    <thetext>That would be trying to slip back in something that is finally expressly forbidden in HTML5 =)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103633</commentid>
    <comment_count>17</comment_count>
    <who name="brunoais">brunoaiss</who>
    <bug_when>2014-04-09 21:34:09 +0000</bug_when>
    <thetext>thamn! :(</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>