8000 [css-inline] Is initial-letter in-flow or out-of-flow? · Issue #743 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-inline] Is initial-letter in-flow or out-of-flow? #743

@upsuper

Description

@upsuper

It doesn't seem to be clear whether initial-letter is in-flow or out-of-flow. More specifically, is the box of initial-letter first-letter contained by its ancestors' box?

For example, if I have:

<style>div::first-letter { initial-letter: 2; }</style>
<div><span style="background: yellow">hello world</span></div>

does the first letter "h" has the yellow background as well? Also what if the span has border?

If the initial letter is out-of-flow, then the background color would not cover the initial letter. I believe it is how WebKit currently implements initial letter (it simply makes initial-letter floating). If the initial letter is in-flow, then initial letter would have the background color as well.

I guess the difference on their effects might not be very important, but it would significantly affect how they would be implemented. I think handling initial letter as out-of-flow is probably easier to implement (as shown by WebKit), but CSSWG should decide whether that is what we want.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0