- From: Ian Hickson <py8ieh@bath.ac.uk>
- Date: Mon, 24 Jan 2000 13:02:15 +0000 (GMT)
- To: Matthew Brealey <thelawnet@yahoo.com>
- cc: www-style <www-style@w3.org>
On Mon, 24 Jan 2000, Matthew Brealey wrote: > Indeed. The problem occurs with something like: > P { line-height: 1.4; background: green; } > SPAN.insideP { background: red; } > > SPAN.insideP's background would look stupid - it wouldn't be lined > up with the top of the line box. Assuming this markup: <P> some text <SPAN class="insideP"> span </SPAN> some text </P> ...then the "span" text's background would appear as in this screenshot: http://www.bath.ac.uk/%7Epy8ieh/internet/projects/wwwstyle/inline-bg1-reference.gif Looks fine to me. >> block { line-height: 2; } >> span { background: something; } > Under CSS as it stands, this would result in: > +---------------------------+ > | | > | | > |mmmmmmmmmmmmmmmmmmmmmmmmmmm| > |mmmmmmmmmmmmmmmmmmmmmmmmmmm| > | | > | | > +---------------------------+ > where m indicates the background, with the rest of the line box > transparent. This _would_ look ugly. Cf. my proposal: > +---------------------------+ > |mmmmmmmmmmmmmmmmmmmmmmmmmmm| > |mmmmmmmmmmmmmmmmmmmmmmmmmmm| > |mmmmmmmmmmmmmmmmmmmmmmmmmmm| > |mmmmmmmmmmmmmmmmmmmmmmmmmmm| > |mmmmmmmmmmmmmmmmmmmmmmmmmmm| > |mmmmmmmmmmmmmmmmmmmmmmmmmmm| > +---------------------------+ Well, putting the issue of "ugliness" aside (I disagree, but it's subjective so never mind), what you want can be done simply by putting a background on the block. So why prevent the alternative? -- Ian Hickson ("`-''-/").___..--''"`-._ http://www.bath.ac.uk/%7Epy8ieh/ `6_ 6 ) `-. ( ).`-.__.`) (_Y_.)' ._ ) `._ `. ``-..-' fL Member, Mozilla Quality Assurance _..`--'_..-_/ /--'_.' ,' Browser Standards Compliance Team (il).-'' (li).' ((!.-'
Received on Monday, 24 January 2000 08:02:40 UTC