- From: Ben Curtis <bcurtis@bivia.com>
- Date: Fri, 11 Mar 2005 11:00:40 -0800
- To: www-style@w3.org
On Mar 11, 2005, at 8:22 AM, Ryan Cannon wrote: > Also a syntax like @define could allow great interaction with imported > stylesheets. If the format were strict such that the CSS document > would have to be structured as > > - @definitions > - @imports > - css rules > > then perhaps definitions in the originating files could be applied in > the imported files as well, allowing for a very slim way for sites to > achieve different color schemes for each section. It is worth noting that this functionality, being client-side, offers abilities that are impossible or highly convoluted server-side. Therefore, @define or similar syntax serves a valuable and practical purpose. Some example uses that would be exceedingly difficult server-side: 1. An XML-syndicated content provider supplies an accompanying embedded stylesheet that handles layout, sourced from their server and adjusted on occasion to take into account new content styles. The content is included in an XHTML web page on the client, and the author of this webpage would like the syndicated content to match his page's color and style schemes. She could compose her own stylesheet, but delivering it to override the embedded stylesheet so that her styles take effect through the cascade is difficult without making everything !important. She could have the server parse the embedded stylesheet and change it, but then as the publisher changes things so must she. Or, with @define, the publisher could use defined values and the page author supply those values once. 2. Author-supplied stylesheets could hook into user-supplied stylesheets allowing for easy customization of the styles that does not need to be re-worked if the author stylesheet undergoes changes. Crossing the boundary between authors, and between authors and users is currently very difficult -- you can only override, but not adopt. Style declarations are either one or the other, which makes the cascade easy to calculate but reduces the ability of authors to interact and provide customizable services to users. I think it is worth noting that user agents may already employ a strategy like #2 to allow for a default stylesheet to be configured via user preference dialogues. Also, this sort of ability is already in the CSS spec for quotes, which are defined in one location and the definition used on other locations. -- Ben Curtis : webwright bivia : a personal web studio http://www.bivia.com v: (818) 507-6613
Received on Friday, 11 March 2005 19:12:23 UTC