- From: Loirooriol via GitHub <sysbot+gh@w3.org>
- Date: Sun, 16 Apr 2017 04:34:28 +0000
- To: public-css-archive@w3.org
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-display] In example 3, the run-in is inserted as child despite inline formatting context. ==
CSS Display defines [Run-In Layout](https://drafts.csswg.org/css-display/#run-in-layout) as
> A run-in box behaves exactly as an inline-level box, except:
>
> - If a run-in sequence is immediately followed by a block box that does not establish a new formatting context, it is inserted as direct children of the block box [...]
> - Otherwise, an anonymous block box is generated around the run-in sequence and all immediately following inline-level content (up to, but not including, the next run-in sequence, if any).
> - A run-in box with a flow inner display type inlinifies its contents.
The example is
>
> ```html
> <dl class='dict'>
> <dt>dictionary
> <dd>a book that lists the words of a language in alphabetical
> order and gives their meaning, or that gives the equivalent
> words in a different language.
> <dt>glossary
> <dd>an alphabetical list of terms or words found in or relating
> to a specific subject, text, or dialect, with explanations; a
> brief dictionary.
> </dl>
> ```
> ```css
> .dict > dt {
> display: run-in;
> }
> .dict > dt::after {
> content: ": "
> }
> ```
> Which is formatted as:
> <pre><b>dictionary:</b> a book that lists the words of a language
> in alphabetical order and explains their meaning.
>
><b>glossary:</b> an alphabetical list of terms or words found
> in or relating to a specific subject, text, or dialect,
> with explanations; a brief dictionary.
> </pre>
However, the `dd` establishes an inline formatting context according to [CSS 2.1](https://www.w3.org/TR/CSS21/visuren.html#block-boxes):
> A block container box either contains only block-level boxes or establishes an inline formatting context and thus contains only inline-level boxes.
So I think the `dt` should not be inserted inside the `dd`.
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1228 using your GitHub account
Received on Sunday, 16 April 2017 04:34:39 UTC