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

Pure grid unit pure-u-1 reset to "display: block", causing problems #94

Closed
adapterik opened this issue Jun 12, 2013 · 5 comments
Closed
Labels
Milestone

Comments

@adapterik
Copy link

Hi,
Currently, the pure-u-1 full width unit is redefined as "display: block". This is done in the section of code that sets up the widths of units, so I assume this was seen as a way of ensuring that it is 100% width.

Why not just leave it as inline-block and set the width to 100%, which would be consistent with the other pure-u-#-# units?

I've encountered at least one problem with pure-u-1 (I don't have time to diagnose in detail because I have a workaround below -- margins of enclosed markup doesn't work as expected), and I imagine there are more. The other css config that is used to set up the units for proper behavior maybe are interacting badly with display: block.
My workaround is to simply add this to my css, loaded after Pure:

.pure-u-1 {
    display: inline-block;
    width: 100%;
}

With this, all is good, but it is a source of layout bugs that should be squashed.

@tilomitra
Copy link
Contributor

@msweeney I was thinking the same thing. Do you have any thoughts on this?

@ghost ghost assigned msweeney Jun 13, 2013
@msweeney
Copy link
Contributor

👍 for this change. In addition to consistency with other units, elements such as inputs that don't expand to 100% when declared as display: block will now behave as expected.

@tilomitra
Copy link
Contributor

Cool. We can pull this in for the next release along with our other grids work.

@ericf
Copy link
Collaborator

ericf commented Jun 17, 2013

+1 I've ran into issues with the display: block on this before.

tilomitra added a commit to tilomitra/pure that referenced this issue Jul 10, 2013
ericf added a commit that referenced this issue Jul 11, 2013
Fix issue #94: Change `pure-u-1` to display: inline-block; width: 100%
@ericf
Copy link
Collaborator

ericf commented Jul 11, 2013

I merged PR #134, closing this…

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

No branches or pull requests

4 participants