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

Making .last optional #4

Closed
gf3 opened this issue Apr 21, 2011 · 6 comments
Closed

Making .last optional #4

gf3 opened this issue Apr 21, 2011 · 6 comments

Comments

@gf3
Copy link

gf3 commented Apr 21, 2011

It should be possible (using :last-of-type) to make the .last class optional. The reason I bring this up is that many of us are not concerned with supporting older IEs, but we'd still like to use the awesomeness of your framework and have clean/semantic markup. Pretty please?

@fermion
Copy link

fermion commented Apr 21, 2011

+1, I understand wanting to support older browsers but that syntax could/should be optional if you only care about supporting, say, modern webkit-based browsers. Thanks for the great lib!

@csswizardry
Copy link

I was considering adding this to inuit.css but it's not feasible.

This method assumes your grid is only one row deep. Take the following: (x denotes :last-of-type)

Works
+-------------------+
| +---+ +---+ +---+ |
| |   | |   | | x | |
| +---+ +---+ +---+ |
+-------------------+

Doesn't work
+-------------------+
| +---+ +---+ +---+ |
| |   | |   | |   | |
| +---+ +---+ +---+ |
| +---+ +---+ +---+ |
| |   | |   | | x | |
| +---+ +---+ +---+ |
+-------------------+

The test case for this on inuit.css was the features list where there are several rows of grids in one parent.

However you can drop the .last class totally if you want. inuit.css does it ;)

H

@gf3
Copy link
Author

gf3 commented May 13, 2011

The 1140 CSS Grid requires that all rows be wrapped in a .row, so calling :last-of-type or :last-child within a row is still feasible.

@csswizardry
Copy link

inuit.css also relies on .row (except mine’s called .grids) but that doesn’t mean the :last-of-type will be the right-most div. If you inspect the features list example that I gave you will see what I mean.

@gf3
Copy link
Author

gf3 commented May 13, 2011

@csswizardry Ahh I see what you're saying. Unless my understanding is incorrect, 1140 doesn't even support those types of layouts currently! I'll probably be switching over to inuit! Thanks!

@csswizardry
Copy link

Oh, erm, sorry to hijack this. Just thought I'd point out potential problems with the :last-of-type method as I've already tried/researched it :)

Cheers,
Harry

@gf3 gf3 closed this as completed May 13, 2011
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

3 participants