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

Chrome details element doesn't correctly propagate box-sizing #22872

Closed
andrewbelcher opened this issue Jun 20, 2017 · 2 comments
Closed

Chrome details element doesn't correctly propagate box-sizing #22872

andrewbelcher opened this issue Jun 20, 2017 · 2 comments

Comments

@andrewbelcher
Copy link

There is a bug in Chrome where inheritance of box-sizing does not happen correctly with the details element. This results in all input (and every other element that is width: 100%) overflowing the details.

This is demonstrated by this codepen.

The solution is to add:

details > * {
  box-sizing: border-box;
}

Would post a PR, but can't get grunt working locally and don't have time to fix it now.

@mdo
Copy link
Member

mdo commented Jun 20, 2017

Would post a PR, but can't get grunt working locally and don't have time to fix it now.

We're off Grunt now and on npm scripts :). Pull the latest, update bundler, npm install, and you should be good to go.

@prateekgoel
Copy link
Contributor

prateekgoel commented Jul 9, 2017

I think the above solution will be specific to input elements. There may me scenarios where this is the problem with other elements too.
I think, the better solution is to change box-sizing: inherit; to box-sizing: border-box;
Like this:

*, *::before, *::after {
  box-sizing: border-box;;
}

I would like to make this change.

@mdo mdo added the has-pr label Aug 4, 2017
mdo pushed a commit that referenced this issue Aug 11, 2017
* Fix to Chrome inheritance bug (#22872)

* Remove box-sizing from html

box-sizing removed from html and order of wild card selected and html selector swapped to maintain correctness of comments.
@mdo mdo mentioned this issue Aug 11, 2017
@mdo mdo mentioned this issue Jul 16, 2019
1 task
@MartijnCuppens MartijnCuppens mentioned this issue Dec 14, 2019
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants