- From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
- Date: Sun, 26 Dec 2010 02:38:50 +0100
- 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.
<div>
text1
<p>text2</p>
text3
</div>
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
Selectors...
</Daniel>
Received on Sunday, 26 December 2010 01:39:21 UTC