-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Sprite selector too long for IE8 #1193
Comments
This seems like an edge case problem and I'm glad you found a solution that works. I personally haven't run into this and I have very long selectors. |
Thanks @scottdavis Seeing as this isn't a problem with Compass, this issue can be closed, unless you'd like this to be visible to others for a while. Up to you =) |
Hello, The "long" CSS selector generated by compass is the following: .siteSprite-sprite, input[type="checkbox"] + .cb, And IE8 (and just IE8) ignores this CSS selector. Is there something we can do to make Compass split this CSS selector in multiple ones? Thank you |
Hi again, The problem IS NOT THE LENGTH of the selector, but the usage of the :checked pseudoelement. So, the problem is not with compass. |
Problem
This selector, created by Compass Sprite, is ignored by IE8. Splitting it up into smaller fragments fixes this.
Fix
This ruby class, CssSelectorSplitter, arbitrarily splits a long selector into smaller chunks. It was my first bit of Ruby code, based off this splitter, and works for me in a private project. It's a bit overkill in how much a long selector gets split up, but it works well enough for a deadline =)
Noticed before?
My Google-Fu isn't great, but I couldn't find anything.
However, this issue isn't IE's limitation on the number of selectors per stylesheet, which is 4095 and is solved by the previously mentioned splitter.
The text was updated successfully, but these errors were encountered: