[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-layout
Subject:    Re: min-line-height
From:       Ian Hickson <py8ieh () bath ! ac ! uk>
Date:       2000-01-27 21:32:09
[Download RAW message or body]

On Tue, 25 Jan 2000, fantasai wrote:

>> Have a look at:
>> http://www.bath.ac.uk/%7Epy8ieh/m/line-height-investigations.html
>> ...(IN MOZILLA!) and see which paragraph you prefer -- the top one
>> or the bottom one.
> I prefer the bottom one.

Which is easier to do with the current spec.

 
> Here's my example:
>    http://fantasai.tripod.com/Mozilla/lineheight.html
> (also to be viewed in Mozilla :)
> 
> Do you have a definite preference?

In this particular case, I prefer the first one -- but it not
correctly marked up, so it is a bad example.

A forced line break (<br>) in a paragraph should almost *never*
happen. An exception might be for something like an address, but even
then that just shows that the markup is not rich enough.

In the case of this test document, the 'correct' markup would have
been either three consecutive paragraphs, with no margins between them
and a smaller line-height and font-size for the middle paragraph, or a
single paragraph with the small section marked in a <span> or
equivalent and the <span> given "display:block" with a smaller
line-height and font-size.

Both of these solutions work best with CSS' current definition. (Yes,
CSS works best with richly marked up documents.)


> What if the paragraph was longer?

Which bit? I don't think it matters, since with a correctly (richly)
marked up document, both styles can be easily achieved.


>   http://fantasai.tripod.com/Mozilla/lineheight2.html
> Which do you prefer from Set 1? What about Set 2?

In both cases I distinctly prefer the version with a constant
line-height. I also believe that most professionally designed
documents with this kind of effect use a constant line-height.


> A commercial use:
>   http://fantasai.tripod.com/Mozilla/lineheight3.html
> Did that make any sense?

Yes -- in this case the varying line-height case is best, since that
is what is being looked for. But this case is easy to do with the
current definition of 'line-height', as you discovered. And the only
difference between this document and the version you would have to
create to get the same effect _without_ the
minimum-line-height-on-blocks clause is the change of line-height on
the paragraph block.

 
> Aside from that, here's an example in literature:
>   http://fantasai.tripod.com/Mozilla/lineheight4.html
> Do you prefer Version 1 or Version 2? Why?

The first, because the second case doesn't make the small text look
sneaky. But again, this is a case of poor markup. You could get the
same effect merely by making the small lines blocks:

   .v1 .leteli { font-size: 8pt; line-height: normal; display: block; }

...and getting rid of the style on the paragraph altogether.


It seems to me that in most cases, the current definition is easiest
to use, and in the cases where the line-height _does_ want to vary
with font-size, the same effect can be achieved already, and very
simply. It's all really a matter of using rich semantic markup.

-- 
Ian Hickson                            ("`-''-/").___..--''"`-._   
http://www.bath.ac.uk/%7Epy8ieh/        `6_ 6  )   `-.  (     ).`-.__.`)
                                        (_Y_.)'  ._   )  `._ `. ``-..-' fL
Member, Mozilla Quality Assurance     _..`--'_..-_/  /--'_.' ,'
Browser Standards Compliance Team    (il).-''  (li).'  ((!.-'    

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic