- From: Thomas Ashe <Thomas.Ashe@Blackbaud.com>
- Date: Sat, 22 Jan 2000 13:19:41 -0500
- To: "'www-style'" <www-style@w3.org>
- Cc: "'py8ieh@bath.ac.uk'" <py8ieh@bath.ac.uk>
On Friday, January 21, 2000 7:26 AM, Ian Hickson [mailto:py8ieh@bath.ac.uk] wrote: >>> It is the responsibility of the user and UA stylesheet authors to make >>> sure that their generic stylesheets cannot cause clashes. >> That's backwards. *Only* the author is capable of ensuring that >> clashes do not occur, since the authors styles reside at the bottom of >> the cascade. The UA and user stylesheets are at the top of the >> cascade; and the cascade cannot be predicted. > >The last thing in the cascade is actually the user!important stylesheet. > <SNIP> >Then 'color', 'background' and 'border-color' can be used safely in >the user stylesheet (with !important declarations each time). > >This will completely override the author stylesheet's colours. > >Similarly with 'display' and the box properties: > > *, :before, :after, :first-line, :first-letter { > /* reset structure to initial values */ > display: inline ! important; > margin: 0 ! important; > padding: 0 ! important; > border-style: none ! important; > border-width: 0 ! important; > /* plus any others I've forgotten */ > } > >...then the user controls layout, and can use 'display', 'margin', >'padding', 'border' and those I've forgotten safely. For those of use developing web applications, I must ask how a user can use the display property safely. For example, say I serve a page that displays or hides elements using 'display', turning them on or off as the user makes choices on the page. If the user adds: * {display:inline ! important; visibility:visible !important} Then, not only are all block elements now rendered inline, but the user is displaying many input controls that have no context for being there at this point. Any scripts that perform validation are suddenly no longer able to rely on the fact that elements are only displayed when appropriate. Thoughts? -Tom
Received on Saturday, 22 January 2000 13:19:50 UTC