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

Re: Text selector [was Re: breaking overflow]

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 6 Jan 2010 12:59:38 +1300
Message-ID: <11e306601001051559p6cfe901bq9284a879e8006f2e@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Bobby Jack <bobbykjack@yahoo.co.uk>, Boris Zbarsky <bzbarsky@mit.edu>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
On Wed, Jan 6, 2010 at 12:40 PM, Brad Kemper <brad.kemper@gmail.com> wrote:

> I could live with that, if it's as fast as JavaScript regexp processing.
> Simple regexp and literals run pretty fast, don't they? And dynamic element
> changes also require rematching. I don't think I'd want it to run the
> matching every second as I typed into editable HTML.

That's exactly what a browser has to do.

No way. Talk about idealistic goals that cant be reached! I should have the
> content/markup author tell the UA where all the numbers are, just because I
> want to style them differently? I should insist on a separate class for
> every phone number that matches a particular one that I might be interested
> in styling? What HTML tag do I use for a ">" that represents another level
> of breadcrumbs? These are all things that I cannot reasonably expect to be
> in the markup, but that I may want to style. There are already many places
> where authors are adding extra spans in the HTML just to get a
> presentational effect, and I think we should provide ways to alleviate that
> where we can.

Sure, but that set of examples aren't just presentational effects, they have
semantic meaning. Maybe not expressible in HTML directly, but there's
nothing "wrong" with adding classes for them.

CSS needs some cooperation from the document author. Even using
::text("Example \d: *\n"), the author has to make sure to put the right
number of spaces in, which is arguably harder to get right than wrapping the
text in a span with a class.

"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
Received on Wednesday, 6 January 2010 00:00:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:42 UTC