Re: [CSS-X] style sets and style systems isolation

----- Original Message ----- 
From: "Anne van Kesteren" <annevk@opera.com>
To: <www-style@w3.org>
Sent: Sunday, February 11, 2007 1:17 AM
Subject: Re: [CSS-X] style sets and style systems isolation


>
> On Sat, 10 Feb 2007 19:43:10 +0100, Andrew Fedoniouk 
> <news@terrainformatica.com> wrote:
>> 4) Neither WHATWG ("HTML5") nor XBL are providing solution
>> for styling of input elements and their parts.
>> <input type=calendar> without styling is almost useless in practice.
>> With styling it can replace tons of calendars implemented in
>> e.g. various blog engines.
>
> I'd suggest you look again at XBL.
>

Sorry but I didn't find there any idea of how to style, say, this:

select > option[value="1"] { background-color:green; }

Yes, you can generate content on the client side by using XBL
almost in the same way as you would do it on the server side by using
XSLT or PHP processors. But XBL has no solution for styling
style systems of components. Each component has its intrinsic styles.
Without them such component is just nothing.
Ideally XBL template of some component shall contain reference
to intrinsic style sheet. That style sheet shall see DOM in its actual
state (shadow elements seen for CSS processor);
For the external style system (host document) shadow elements
may not be seen. This is simpler than proposed "4.7.1. Selectors and Shadow 
Scopes"
with too many if's and else's.

Say you have following declaration

<xbl:binding id="fileUploadControl">
  <xbl:template>
    <html:input type="text" xbl:pseudo="value"/>
    <html:input type="button" value="Browse..."/>
  </xbl:template>
</xbl:binding>

Then selector used in style sheet
  input[type="text"]
will match input portion of the file upload compound control.
Otherwise if you rely solely on cascading you will need to
create redundant style declarations.

input[type="text"] { ... }
input[type="file"] > input[type="text"] {  ...discard declarations 
bove...  }

In any case I think XBL will benefit from style-sets existence.

Andrew Fedoniouk.
http://terrainformatica.com

Received on Monday, 12 February 2007 00:28:32 UTC