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

Re: Two CSS challenges

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Sun, 26 Dec 2010 02:38:50 +0100
Message-ID: <4D169CAA.6080204@disruptive-innovations.com>
To: Andrew Fedoniouk <news@terrainformatica.com>
CC: Andrew Fedoniouk <andrew.fedoniouk@live.com>, www-style@w3.org
Le 26/12/10 02:16, Andrew Fedoniouk a écrit :

> I want something like this:
> ::text
> {
> position:relative; left:1px; top:1px;
> }
> that is shift in both directions.

Consider a property allowing to "move" the vertical alignment
of a box by a given offset. That's what I suggested and it addresses
your need w/o introducing ::text.

> With ::text I can style both lines as
> "text 1<cr/lf> text 2"
> is wrapped into single anonymous [text] box.
> If <br/> was not declared as display:block; of course but that is
> another story.

Right. But I am saying that if you start targeting individual text
nodes, web designers will end up with bad side effects so they'll
ask for more.


your ::text { border: 1px solid black } will put a border around
text1 and text2. You can't target only one of them with ::text.

Text nodes should not be targeted through a pseudo-element. They
need something equivalent to a type element selector, same level,
same specificity. When you query the nodeName of a TEXT_NODE, the
DOM replies "#text". Unfortunately, "#" is already meaninful in

Received on Sunday, 26 December 2010 01:39:21 UTC

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