W3C home > Mailing lists > Public > www-style@w3.org > April 2016

Re: [css-selectors] Tagname based substrings

From: Marat Tanalin <mtanalin@yandex.ru>
Date: Wed, 06 Apr 2016 21:18:03 +0300
To: "Davis, Greg" <greg.davis@pearson.com>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <1768631459966683@web23g.yandex.ru>
05.04.2016, 20:04, "Davis, Greg" <greg.davis@pearson.com>:
> In my ongoing investigation of web components, I'm finding a place where I want to target a substring of a tagname to keep the authoring semantic. That is, when I author my tags like this:
> <x-navigation />
> <x-quiz />
> etc...
> I want to namespace to them so they have shared attributes like fonts, etc. I can't find a way in the documentation on attribute substrings, but might just be missing it. Is there a way to target a tagname? I'm thinking like this:
> *[tagname^="x-"] { ... }

This makes sense. The syntax you've provided is already used for attribute selectors, so some functional notation could probably be used instead, e.g.:

    :tag-name(^"x-") {...}
Received on Wednesday, 6 April 2016 18:18:36 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:58 UTC