W3C home > Mailing lists > Public > www-style@w3.org > June 2016

Re: [css-inline] Controlling half-leading

From: Dave Cramer <dauwhe@gmail.com>
Date: Fri, 24 Jun 2016 12:30:53 -0400
Message-ID: <CADxXqOyKf+CpDK9bue7=mATJtvW4sigfSztFrWr9YO4rA6mVkA@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>
On Tue, May 10, 2016 at 2:40 AM, fantasai <fantasai.lists@inkedblade.net>
wrote:

> One of the problems that keeps coming up for quality typesetting
> is the way half-leading works in CSS. There are a handful of issues,
> but one of the major ones is that authors cannot control the amount
> of leading (which is effectively extra space between the content of
> the line and the content edge of the box) at the top or bottom of
> a box (particularly one which is made visible, e.g. through backgrounds
> or borders) or fragmentainer.
>
> [If I understand correctly, the half-leading model was chosen for CSS
> in order to handle blocks that don't have such visible boundaries,
> e.g. consecutive paragraphs.]
>
> Dave Cramer and I discussed the possibility of adding a property to
> control whether half-leading is added at the top/bottom of a block
> so that authors can get the control they need at the top of the page
> etc.
>
> It would look something like
>
>   leading: always | auto | never
>
> where
>
>   always - always add half-leading above/below the line box (default)
>   never  - never add half-leading above the first line box or below
>            the last line box
>   auto   - as 'never' for boxes that establish a new formatting context
>            (i.e. flex items or other BFC roots) or boxes that have
>            borders or padding [similar rules to margin collapsing]
>


 InDesign offers several ways to define the position of the first line of
text in a box.

1. Ascent. The ascender of the box font aligns to the top of the box.
2. Cap height. The cap height of the box font aligns to the top of the box.
3. X-height. The x-height of the box font aligns to the top of the box.
4. Leading. The distance from the top of the box to the first text baseline
is equal to the line height.
5. Fixed. The user specifies a length from the top of the box to the first
text baseline.

Conveniently, CSS uses none of these. Being able to specify a fixed length
(#5) would be really helpful for us, as visual alignment is so dependent on
the baseline.

Dave
Received on Friday, 24 June 2016 16:31:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:47 UTC