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

Re: Two CSS challenges

From: Andrew Fedoniouk <andrew.fedoniouk@live.com>
Date: Sat, 25 Dec 2010 17:16:21 -0800
Message-ID: <BLU159-ds169424F63E5FAEE1AA6FC7F81F0@phx.gbl>
To: "Daniel Glazman" <daniel.glazman@disruptive-innovations.com>
Cc: <www-style@w3.org>
>-----Original Message----- 
>From: Daniel Glazman Sent: Saturday, December 25, 2010 4:23 PM Subject: Re: 
>Two CSS challenges
>Le 25/12/10 21:31, Andrew Fedoniouk a ecrit :
>>
>> Here are two challenges that have no solutions in modern CSS.
>>
>> 1. Consider this simple markup:
>>
>> <p> Something <span>Like a Button</span></p>
>>
>> I would like to define the span above to behave (visually) as a
>> button - on span:active I would like to shift/offset its text from
>> its normal position by 1px.
>
>You want vertical-align-offset.

I don't know such creature as "vertical-align-offset".

I want something like this:

::text
{
   position:relative; left:1px; top:1px;
}

that is shift in both directions.

>
>> 2. Consider another markup:
>>
>> <div> text 1 <p>text 2</p> </div>
>>
>> By definition [1] "text 1" is wrapped into so called anonymous box -
>> block element of appropriate type. If I want to draw 1px solid red;
>> border around that box how would I do so?
>
>::text is clearly not enough here and it will disappoint a lot of
>people:
>
><div>
>    text 1<br/>
>    text 2
>    <p>text 2</p>
></div>
>
>Even with ::text, you can't style "text 2".
>

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.


-- 
Andrew Fedoniouk

http://terrainformatica.com 
Received on Sunday, 26 December 2010 01:16:58 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:35 GMT