W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: line-height suggestions and easier alignment

From: Peter Sorotokin <psorotok@adobe.com>
Date: Wed, 4 Jan 2012 16:32:49 -0800
To: "www-style@gtalbot.org" <www-style@gtalbot.org>
CC: Alan Gresley <alan@css-class.com>, Richard Le Poidevin <ric@betleywhitehorne.com>, W3C www-style mailing list <www-style@w3.org>
Message-ID: <CB2A2BA4.1B1F7%psorotok@adobe.com>

On 1/4/12 12:13 PM, "Gérard Talbot" <www-style@gtalbot.org> wrote:

>Le Mer 4 janvier 2012 11:27, Peter Sorotokin a écrit :
>> Just to add two cents here: mismatch in leading model (and in vertical
>> spacing) is indeed a huge pain for tools like InDesign.
>I do not understand why you are not the first person to say that Adobe
>tool like InDesign is not perfectly, entirely compliant with CSS 2.1 to
>begin with, to start with and it should be entirely compliant with CSS 2.1
>(and possibly ATAG 1.0). Standards are mutually beneficial to compliant
>There is no compatibility/incompatibility problems (headaches, nightmares)
>if we all follow and implement W3C web standards.


I do not understand your point. In what sense do you expect InDesign to be
CSS-2.1-compliant, given that there are tons of features in InDesign that
are not addressed even in CSS3?

>> It can be
>> partially worked around (if there are no backgrounds) with negative
>> margins, but not in paginated or multi-column environment. There needs
>> be another property that would control top margin of the elements that
>> have page/column/region break inside them (call it margin-top-break).
>> Currently margin is defined to be zero in such cases.
>Which cases?
>User agent stylesheet have default margin values for various elements.
>p {margin: 1em 0em;}
>h1 {margin: 0.67em 0em;}
>CSS2.1 User Agent Style Sheet Defaults
>Appendix D. Default style sheet for HTML 4 (informative, not normative)
>provide more information on all this.

This stuff is mostly irrelevant for the problem that I was trying to

The problem occurs when a multi-line paragraph with large leading (say,
line-height:2) gets broken across two pages. Proper typography requires
top edge of the first line on the second page to be aligned with the top
edge of the printable area of the page. In CSS it will be shifted down
one-half of the leading. On the first page it can be "fixed" using
negative margin, but not on the second page. (And negative margin trick,
of course, only works when line-height does not change in the paragraph
and hen there is no background).

I think it is roughly the same problem that Richard reported in the first
post on this thread.


Received on Thursday, 5 January 2012 00:33:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:09 UTC