Skip to content

[css-rhythm-1] Add content-box to block-step-insert so authors can have content grow instead of adding space #10486

@jensimmons

Description

@jensimmons

In CSS Rhythm level 1 the block-step-insert property has two values: margin and padding, to specify whether the space added in order to step everything to the step unit is margin or padding.
https://drafts.csswg.org/css-rhythm/#block-step-insert

I can imagine a lot of user cases where instead the author would want the content box to grow — for images, for instance. (Then object-fit: cover could be applied to the image, creating a slight crop, to get the image box to beautifully be the right height that's an increment of the step unit. And there is no "extra space".)

So let's change the definition to be:

Name: block-step-insert
Value: margin-box | padding-box | content-box

I like margin-box and padding-box better as well — since we aren't really adding to the margin or padding. The margin and padding will still be what they are, defined by the author/UA. We are adding extra space into the margin box or the padding box. These values make that more clear.

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