Previous Message
Next Message

RE: [css-d] p code, text-indent

Sent by David Cantrell on 14 September 2002 16:04


>There are no selectors even in the css3 selectors CR that allow you to 
>go backwards up the order yet, so basically it's impossible to style 
>something based on what it contains, or what comes after it. So 
>basically, you'll have to use a class until such time as that's changed 
>and it's implemented in the browsers most people use. Say by the year
>2100?

I know exactly 0% of CSS3. But can anyone tell me why the CSS spec can't use
much of the same syntax as the XPath spec? Especially given that XHTML can
be parsed as XML.

i.e. you could specify  

  /body/p[code='content here']
  {
    color: #c00;
    background-color: #eee;
    border: dashed #999 1px;
  }

I figured this would be a *lot* more intuitive than some of the rules they
have out there now, and would provide a lot of the flexibility a lot of us
are looking for. Finally we'd be able to create stylesheets without EVER
touching the underlying HTML code! Isn't that the holy grail we're all
after?

Just some thoughts...
-dave
Previous Message
Next Message

Message thread:

Possibly related: