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

Re: Two CSS challenges

From: Karl Dubost <karld@opera.com>
Date: Sun, 26 Dec 2010 12:08:30 -0500
Message-Id: <A7F018D3-6461-413F-950F-E57C09131914@opera.com>
Cc: <www-style@w3.org>
To: "Andrew Fedoniouk" <news@terrainformatica.com>, Andrew Fedoniouk <andrew.fedoniouk@live.com>

Le 25 déc. 2010 à 15:31, Andrew Fedoniouk a écrit :
> <div>
>   text 1
>   <p>text 2</p>
> </div>
> If I want to draw 1px solid red;
> border around that box how would I do so?

There is something strange in the request itself. I understand the appeal for such features… and if we push further the reasoning it seems to lead to regex (insert nightmare stories here :) ), *but* it isn't what markup is for, aka *marking up* texts with *tags* so they have a specific purpose.

if I understand the requirement

So we have
//select the div box
//select the p box inside the div
div p {}

// select the text inside div but outside p 

which is different from XPath expression which select every text nodes under an element.

Then the evil is hidden in details

Would style apply to text 1 and text 3?

<div>text 1<p>text 2</p>text 3</div>

What's happening with spaces?
<div>text 1 <p>text 2</p> text 3</div>

What's happenning with display: none on "div p"

Karl Dubost - http://dev.opera.com/
Developer Relations & Tools, Opera Software
Received on Sunday, 26 December 2010 17:09:11 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:54 UTC