W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Re: [CSS21] display:run-in clarifications - run-in and :first-line

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 2 Sep 2009 13:55:14 -0500
Message-ID: <dd0fbad0909021155x7487cddfl2390a5872e2fd0fa@mail.gmail.com>
To: Bert Bos <bert@w3.org>
Cc: www-style@w3.org
On Wed, Sep 2, 2009 at 1:01 PM, Bert Bos<bert@w3.org> wrote:
> Combining run-in headings with first-line styling may no doubt give
> interesting effects (at least interesting challenges for
> implementers :-) ), but I can't remember ever having seen it in use.
> That is no doubt because such a thing is difficult to recognize: if you
> apply a first-line style to a paragraph, then it becomes difficult to
> see that the paragraph starts with a heading. Which means, in effect,
> that combining these effects is bad typography.

To an extent.  I think that reasonably common typographic effects on
first-lines include small-caps and increases in letter-spacing, both
of which can be reasonably applied to a run-in header without removing
the 'header-ness' of it (which is often conveyed through weight or

So, let's talk typographic convention.  First: in normal typography,
is the header styled identically as a block and run-in?  I think not -
at the very least, block headers are usually substantially bigger than
the surrounding body text, while run-in headers are equal size or only
slightly larger.  So, there's a vote for having *some* mechanism of
styling a header differently when it's a run-in.

Second: when headers are run-in with a specially styled first-line,
are they styled the same?  You yourself suggest that they are not, and
I agree.  While some styles are shared (my point two paragraphs ago),
some properties are sufficiently different so that you can still
visually tell the header apart from the content.  So, that suggests
that using ::first-line on run-in headers isn't sufficient, at least
on its own.

This points to the idea that we need a way to target headers with
styles based on whether they're running-in or staying block.  The
first idea that comes to mind is a :running-in pseudoclass on the
header that matches whenever the header is running-in.  This seems
like a good idea, but is it enough?  Can this by itself solve the
styling issue so we can go with Option A and just sidestep the
inheritance issue?

By itself, I think yes.  It does mean duplicating the shared
properties between p::first-line and h1:running-in, but that's not too
bad.  However, the ::first-letter issue makes this more complex.  When
I'm using ::first-letter, I can say unambiguously that I expect it to
apply to a running-in header.  It would be really weird and probably
complicate things more in the future if ::first-letter and
::first-line affected different text.  So, for typographical and
mental consistency reasons, Option B looks like the best plan.
(Option C just punts the issue and disallows valid and useful visual

So, I propose that ::first-line and ::first-letter *do* include run-in
headers.  For purposes of inheritance, ::first-line is higher than the
header while it's running-in (::first-letter is as low as possible, as
usual).  I also propose that a :running-in pseudoclass be added which
matches only elements which are display:run-in and are currently
exhibiting the run-in behavior (acting as inlines in the following

Received on Wednesday, 2 September 2009 18:56:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:39 UTC