W3C home > Mailing lists > Public > www-style@w3.org > January 2003

Re: Pseudo Element for Strings

From: Simon Jessey <simon@jessey.net>
Date: Sun, 26 Jan 2003 19:50:13 -0500
Message-ID: <002001c2c59e$0d6d0b70$6601a8c0@Simon2S0JP11>
To: <www-style@w3.org>

My apologies. My knowledge of the deep workings of markup/character entities
is rather limited. I was trying to suggest that it would be nice to have a
pseudo element that could pick out specific alphanumeric characters,
odd/even characters or even specific character entities. The debate that has
been raging on www-html about whether or not the style attribute should be
removed in XHTML 2.0 might get even more interesting if such pseudo elements
were also available because of the fine level of control they would allow.

An example can be found on my weblog.
I style the "si-blog" characters by giving an id to "si", "-" and "blog" and
then specifying their behavior in the external style sheet. I would rather
not have to assign an id to each component (it makes for ugly markup) and
instead have a set of pseudo elements that could do the task for me. For
.heading :char('s'), .heading :char('i') { color: red; }
.heading :char('-') { color: blue; }
.heading :word('blog') { color: green; }

Perhaps someone can suggest an alternative way of doing it?

Simon Jessey

w: http://jessey.net/blog/
e: simon@jessey.net

----- Original Message -----
From: "David Woolley" <david@djwhome.demon.co.uk>
To: <www-style@w3.org>
Sent: Sunday, January 26, 2003 6:45 PM
Subject: Re: Pseudo Element for Strings

> > and perhaps they could be expressed like :char('a'), :char('&copy;'),
> &copy; is effectively a macro standing for a numeric character value.
> It's an SGML or XML macro, so is meaningless in CSS.
Received on Sunday, 26 January 2003 19:50:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:05 UTC