Search This Blog

Friday, October 26, 2007

Behavioral Extensions to CSS

W3C announced the release of an updated version of the "Behavioral
Extensions to CSS" Working Draft. The document was produced by members
of the W3C CSS (Cascading Style Sheets) Working Group as part of the
Style Activity. In 1999, the CSS working group worked on a "Behavioral
Extensions to CSS" specification that proposed syntax for actual
binding definitions. Since then, separate languages have been developed
for this purpose (e.g. XBL), and the CSS-specific way of defining
bindings has been dropped. CSS is still useful for connecting these
binding languages to actual elements, however. This specification
defines two features of CSS that can be used with any such binding
language. Behavioral Extensions provide a way to link to binding
technologies, such as XBL, from CSS style sheets. This allows bindings
to be selected using the CSS cascade, and thus enables bindings to
transparently benefit from the user style sheet mechanism, media
selection, and alternate style sheets. A "binding" is a definition of
presentation or behavior that can be attached to an element, and
bindings can be attached to elements through CSS using the 'binding'
property. Bindings attached through CSS must only remain on the bound
element as long as the element continues to match the style rule. If
at any time a resolution of style on the element determines that a
different binding should be attached, the old binding must be detached.
Whenever an element is removed from a document, any bindings attached
to that element via CSS must be detached. The ":bound-element"
pseudo-class, when used from a binding, must match the bound element
of that binding. If the selector is used in a context that is not
specific to a binding, then it must match any bound element. One
example shows an XBL binding that uses this pseudo-class to to draw
a border around each of the children of the bound element, but no
other elements. More Information

No comments: