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

Grid units should have box-sizing: border-box by default. #20

Closed
tilomitra opened this issue May 24, 2013 · 5 comments
Closed

Grid units should have box-sizing: border-box by default. #20

tilomitra opened this issue May 24, 2013 · 5 comments

Comments

@tilomitra
Copy link
Contributor

We should look at moving to box-sizing: border-box by default for all containers.

@giuseppeg
Copy link

Since

By default, grid units don't have any margin/padding. If you want to add these, put them in a child container.

there is no need for that

@ericf
Copy link
Collaborator

ericf commented May 29, 2013

+1 for looking into to this. @msweeney it would be great to get your thoughts on this too.

@msweeney
Copy link
Contributor

I'm assuming the rationale for overriding default box-sizing is so that borders and padding can be applied directly to units, but it would be good to call out the actual issue this resolves.

Pros:

  • can add padding + borders to units

Cons:

  • lose legacy IE support (box-sizing is IE8+)
  • added specificity makes it harder to override/unset box-sizing

I'd prefer we didn't have an opinion either way, and just use the default, assuming users can customize as needed.

@ericf
Copy link
Collaborator

ericf commented May 30, 2013

I'd prefer we didn't have an opinion either way, and just use the default, assuming users can customize as needed.

Yeah, good idea, that's seems like the smart thing to do. @tilomitra we could handle this through documentation, e.g. on the site's grids page we could so an example that uses box-sizing and one which doesn't, describing the pro/cons that @msweeney listed.

@tilomitra
Copy link
Contributor Author

@ericf @msweeney I'm okay with this. Closing this out and adding it as a documentation issue on pure-site:
https://github.com/yui/pure-site/issues/85

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