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

increase margin between paginator items to fix issue #127 #131

Merged
merged 6 commits into from
Jul 17, 2013

Conversation

tilomitra
Copy link
Contributor

Pretty self-explanatory. Tested across all browsers supported by Pure. Firefox and IE9 adds a 1px white space between paginator items, whereas Webkit doesn't, but I think this looks a lot better than the broken inner box-shadow.

@tilomitra tilomitra mentioned this pull request Jul 9, 2013
@ghost ghost assigned ericf Jul 9, 2013
@@ -10,7 +10,7 @@
display: inline-block;
*display: inline;
zoom: 1;
margin: 0 -0.35em 0 0;
margin: 0 -0.25em 0 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so this negative margin is to cancel out the whitespace. This is similar to what Grids does…should we use the negative letter-spacing rules that grids uses for this instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericf Yes, we can by adding the following to .pure-paginator { ... }:

    letter-spacing: -0.31em; /* Webkit: collapse white-space between units */
    *letter-spacing: normal; /* reset IE < 8 */
    *word-spacing: -0.43em; /* IE < 8: collapse white-space between units */
    text-rendering: optimizespeed; /* Webkit: fixes text-rendering: optimizeLegibility */

I didn't do this because it's a lot more code. What's wrong with the margin fix?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not that much more code. And the issue is that the negative margin won't work when the whitespace is removed from the HTML.

I took the paginator code from this branch and the paginator example from the website but removed the whitespace from the HTML, and the problem still exists: http://jsbin.com/exozog/1/

A bulletproof solution would be to use the same code Grids uses to negate the spacing.

Tested on Latest Chrome, FF, Safari, IE7/8/9.
I had to make the left padding different from the right padding
since the text was appearing skewed to the left with the new
grid fix.
@tilomitra
Copy link
Contributor Author

@ericf 🔔

@ericf
Copy link
Collaborator

ericf commented Jul 17, 2013

@tilomitra you added what is effectively the pure-g rules, but didn't add the corresponding pure-u rules to put back the letter-spacing and word-spacing.

@ericf
Copy link
Collaborator

ericf commented Jul 17, 2013

@tilomitra this needs all the styles from grids-core.css. I'll just go in and add them and merge this now…

@tilomitra
Copy link
Contributor Author

@ericf: I don't think it needs the following:

    vertical-align: top;
    text-rendering: auto;

Are you talking about this?

.opera-only :-o-prefocus,
.pure-g {
    word-spacing: -0.43em;
}

Add _all_ Pure Grids styles to Paginator
ericf added a commit that referenced this pull request Jul 17, 2013
increase margin between paginator items to fix issue #127
@ericf ericf merged commit 23bfcf1 into pure-css:master Jul 17, 2013
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

Successfully merging this pull request may close these issues.

None yet

2 participants