- From: Ian Hickson <py8ieh@bath.ac.uk>
- Date: Thu, 20 Jan 2000 18:06:29 +0000 (GMT)
- To: Matthew Brealey <thelawnet@yahoo.com>
- cc: www-style <www-style@w3.org>
On Thu, 20 Jan 2000, Matthew Brealey wrote: >>> Another reason that this approach is better is that it associates >>> backgrounds with the line box rather than the text. >> This of course means that text can _easily_ flow outside the >> background, which is bad. > Not at all. Give me an example of how this could happen. Give your line boxes a short line-height (however you do that in your proposal) and your inlines a larger font. However, I've just realised an even worse problem with putting the background on the line box rather than the inline boxes. It makes it impossible to have a transparent part if the lines are far apart: +---------------------------+ | | | | << block background here +---------------------------+ | text text text text text | << line background here +---------------------------+ | | | | | | | | +---------------------------+ | text text text text text | +---------------------------+ | | | | | | | | +---------------------------+ | text text text text text | +---------------------------+ | | | | +---------------------------+ In fact, putting backgrounds on the _line_ boxes rather than the _inline_ boxes has an effect almost identical to the effect achieved when backgrounds on blocks, as specified since CSS1 (1996). >>> [...] >>> In fact, the implementation >> What implementation? Do you mean your suggestion? > Implementation is not synonymous with suggestion - implementation = > the CSS 2 implementation. CSS2 implementation? Do you perchance mean the CSS2 specification? An implementation is an actual program which has been designed to work according to the specification. So IE3 and Netscape4 would be very poor implementations of CSS1, for example, while Opera would be a reasonable implementation of the same specification. And so on. >>> means that one cannot follow the advice in the spec that states >>> that one should always set background colours when one sets >>> foreground colours dangerous on inline elements. >> Why? If one does not do as the spec suggests, then one is asking >> for conflicts, meaning that text will be unreadable (e.g., black on >> black). > This is highly unlikely. You could probably search night and day for > a thousand years and not find someone who sets backgrounds on > inline elements. LOL! Oh, please. Even the W3C core styles apply background colours to inline elements. http://www.w3.org/StyleSheets/Core/ > The reason that it is dangerous is that (particularly on A, which is > very commonly set to a different colour) if you set a background on > an inline element within a line box of different colour, the things > don't get lined up and the result looks stupid. Please explain why it would look stupid. Don't forget that "transparent" and "inherit" are perfectly valid backgrounds to specify (in authors stylesheets). It is the responsibility of the user and UA stylesheet authors to make sure that their generic stylesheets cannot cause clashes. See also: http://www.fas.harvard.edu/~dbaron/css/user/ -- Ian Hickson ("`-''-/").___..--''"`-._ http://www.bath.ac.uk/%7Epy8ieh/ `6_ 6 ) `-. ( ).`-.__.`) (_Y_.)' ._ ) `._ `. ``-..-' fL Member, Mozilla Quality Assurance _..`--'_..-_/ /--'_.' ,' Browser Standards Compliance Team (il).-'' (li).' ((!.-'
Received on Thursday, 20 January 2000 13:11:15 UTC