W3C home > Mailing lists > Public > www-style@w3.org > February 2014

[shadow-styling] alternative idea.

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sat, 8 Feb 2014 15:37:30 -0800
Message-ID: <CALRQH78DnkU_O-nfuTBDTrgpN1brFE5iVUkN5LQJQaGV1Gp5JQ@mail.gmail.com>
To: "www-style@w3.org" <www-style@w3.org>
(as an alternative to this: http://dev.w3.org/csswg/shadow-styling/)

Let's imagine that we have @-rule named @shadow that defines block of
rules applied to the shadow tree of some element:

@shadow dropdown-select {

   :host > caption { ... }
   :host > button { ... }
   :host > popup-list { ... }
   :host > popup-list > option { ... }
  ...
}

where :host is the element it is applied to. Essentially
@shadow {} defines style set of sub-tree that is rooted to the host element.

To apply that shadow styling to the element we can add something
like 'shadow' property so this:

select[size=1] {
  shadow: dropdown-select; /* name of style set */
}

will apply @shadow dropdown-select to the shadow three of matching
<select> elements.

This schema does not require any new entities or syntax constructs:
we have @-rules already, so it is a matter of adding new property.


-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Saturday, 8 February 2014 23:37:58 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 8 February 2014 23:37:58 UTC