W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2018

[csswg-drafts] [css-inline] initial-letter appliance and inheritance

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Fri, 12 Jan 2018 19:54:43 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-288229024-1515786882-sysbot+gh@w3.org>
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-inline] initial-letter appliance and inheritance ==
[`initial-letter`](https://drafts.csswg.org/css-inline/#sizing-drop-initials) does not inherit and applies to

> `::first-letter` pseudo-elements and inline-level first child of a block container

The problem is that the inline-level first child box of a block container is the [root inline box](https://drafts.csswg.org/css-inline/#root-inline-box), which cannot be targeted using selectors.

If the definition refers to the first child in the element tree then that's a problem with `display: contents`. And if you have `<div><b><i>Text</i></b></div>`, it's not clear why `initial-letter` applies to `b` but not to `i`.

In any case, since there is no inheritance, it's not clear what happens if you set `initial-letter` both to that first child and to the block container's `::first-letter`, or to nested `::first-letter`s.

Instead, I think there are three reasonable possibilities:

 - `initial-letter` only applies to block containers that establish an inline formatting context, and affects the initial letter of the block container. But note that often the block container that establishes the IFC is an anonymous one, so `initial-letter` should inherit.
 - `initial-letter` only applies to innermost `::first-letter` pseudo-elements, but it inherits, so you can set it on a block-level, inline-level or `::first-letter` parent box.
 - `initial-letter` only applies to innermost `::first-letter` pseudo-elements. And that's all because it doesn't inherit.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2184 using your GitHub account
Received on Friday, 12 January 2018 19:54:46 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:42 UTC