Skip to content

Explicitly mention box-sizing: border-box #8

@samumbach

Description

@samumbach

One of the guidelines, regarding which properties a parent component can alter and which it cannot, implicitly assumes box-sizing: border-box:

properties related to positioning and dimensions (e.g. position, margin, display, width, float, z-index etc) are OK

In particular, width and margin may be unsafe to alter (or at least have unexpected effects) unless the element has box-sizing: border-box.

I wouldn't recommend anything other than box-sizing: border-box these days, but it's still something that can trip people up, especially if they're not using a global reset/normalize.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions