Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

box-sizing: inherit #30

Closed
franciscop-invast opened this issue Aug 21, 2018 · 2 comments
Closed

box-sizing: inherit #30

franciscop-invast opened this issue Aug 21, 2018 · 2 comments

Comments

@franciscop-invast
Copy link

The box-sizing: border-box; fix is one of the first normalizing techniques I use when starting from scratch. But since I discovered the improvement by CSS-Tricks and Paul Irish improved the original post, this is the best modern recommendation:

/* apply a natural box layout model to all elements, but allowing components to change */
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

So, my suggestion here is to update the style to follow that. I can do a PR if needed.

@franciscop-invast
Copy link
Author

I see in the code it's fixed, should the documentation be updated then to reflect it?

Sets box-sizing: border-box;

To:

Sets box-sizing: inherit;

@sindresorhus
Copy link
Owner

There's nothing to change. box-sizing: border-box refers to what it changes for the whole document. The inherit part is just an implementation detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants