Skip to content

[Headers][Enhancements] Headers inside segments with a dimmer shouldn’t have margins when they’re the only children #5270

@Kjaal

Description

@Kjaal

When adding an absolute object like a dimmer to a segment that contains a header, the header thinks it's supposed to put a margin on itself in order to stay above the content ie. the dimmer.

This CSS
h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child { margin-top: 0; }
and
h1:last-child, h2:last-child, h3:last-child, h4:last-child, h5:last-child { margin-bottom: 0; }
Is what disables the margins on the header if it's the only element in the div ie. the segment.

My suggestion would be to allow the header to look like this

<h2 class="compact header">Header content</h2>
This would always have margin: 0

Simple fiddle

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions