This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20186 - [Custom]: Add a CSS pseudo to distinguish between upgraded, custom elements
Summary: [Custom]: Add a CSS pseudo to distinguish between upgraded, custom elements
Status: RESOLVED DUPLICATE of bug 18534
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14968
  Show dependency treegraph
 
Reported: 2012-11-30 18:06 UTC by Daniel Buchner
Modified: 2012-12-10 20:30 UTC (History)
2 users (show)

See Also:


Attachments

Description Daniel Buchner 2012-11-30 18:06:33 UTC
There should be a sane way to distinguish/style elements in their original, non-upgraded state. We don't want every component developer to roll their own attribute flag for this, as it will surely be a common case.

You can approach this from two angles: a pseudo to specify an element is upgraded, :upgraded, or a pseudo for custom elements that are yet to be upgraded, :beforeupgrade.

I can almost guarantee devs will write far more styles targeting the upgraded state, and mostly small visual stuff for elements that are not yet upgraded (a background spinner for instance).

Not sure what route to take, thoughts?
Comment 1 Dimitri Glazkov 2012-12-03 17:33:55 UTC
Scott, Steve -- would love to have your ideas here.
Comment 2 Dimitri Glazkov 2012-12-03 17:35:32 UTC
Right now, there's http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#unknown-element-pseudoclass.

This should give you the ability to style anything that hasn't upgraded yet. For example, if you have x-foo element:

x-foo:unknown <-- matches before upgrade
x-foo <-- matches upgraded
Comment 3 Daniel Buchner 2012-12-03 17:43:10 UTC
(In reply to comment #2)
> Right now, there's
> http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.
> html#unknown-element-pseudoclass.
> 
> This should give you the ability to style anything that hasn't upgraded yet.
> For example, if you have x-foo element:
> 
> x-foo:unknown <-- matches before upgrade
> x-foo <-- matches upgraded

Gosh, I must have overlooked that. In that case, the bases seem covered!
Comment 4 Dimitri Glazkov 2012-12-10 20:30:47 UTC
yay!

*** This bug has been marked as a duplicate of bug 18534 ***