Skip to content

[css-inline-3] Negative margins on inline boxes #8182

Closed
@fantasai

Description

@fantasai

Was just thinking about the question of margins on inline boxes, particularly negative margins, and there's a bit of a problem with how it's defined to work atm:

Consider an inline element with a negative margin:

 <span style="margin-block: -0.1em">set tight</span>

If we introduce another element, this prevents the margin from acting as expected:

 <span style="margin-block: -0.1em">set <em>tight</em></span>

Generally we try to make sure adding unstyled inline elements has no effect on layout, so we need to do something to fix this, maybe propagating the negative margin to descendants somehow?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Monday afternoon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      close