W3C home > Mailing lists > Public > www-style@w3.org > May 2011

[Selectors4] Semantic Pseudo Elements

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Mon, 9 May 2011 19:44:07 +0200
Message-Id: <FC65184C-F2B4-41F3-BCF6-8A7CBE3051DA@crissov.de>
To: W3C style mailing list <www-style@w3.org>
CSS Selectors are currently designed mainly for mark-up languages that feature named elements and attributes, i.e. SGML, XML, HTML:

  <element attribute="value">content</element>

Some other languages might work, too, such as JSON, if some special conventions are followed:

  { "name": "element", 
    "attributes": {"attribute": "value"}, 
    "contents": "content"

Some pseudo elements ‘::foo’ and pseudo classes ‘:foo’ amend this system with structural and semantic values. Some of them accept parameters in parentheses after them ‘::foo(bar)’, ‘:foo(bar)’. Structures not present in the markup ‘@foo’ are supported to some degree, too.

I think we should add semantic pseudo elements (and classes):
1. To enable syntax highlighting (of computer code, especially).
2. To support lean, non-verbose markup (e.g. Markdown, e-mail and wiki syntaxes).

The first use case would require an extensive analysis of what coders’ text editors currently offer and what common constructs computer languages do use. This is a complex task and should probably done in a module or even a compatible specification of its own.

I assume the second scenario to be less complex and hopefully it could be done within CSS / Selectors.
Received on Monday, 9 May 2011 17:44:38 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:45 UTC