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

Not all valid attribute selectors are recognized #6

Closed
akhleung opened this issue Apr 23, 2012 · 6 comments
Closed

Not all valid attribute selectors are recognized #6

akhleung opened this issue Apr 23, 2012 · 6 comments

Comments

@akhleung
Copy link

Attribute selectors of the form [attr] aren't recognized; the parser currently expects to see the attribute matched against a string value (e.g., [attr="blah"]).

@ghost ghost assigned akhleung Apr 23, 2012
@akhleung
Copy link
Author

Fixed.

@lunelson
Copy link

This does not seem to be fixed.

Certain kinds of attribute selector matching—e.g. span[class|="lang"]—still throw an error, although they should be valid.

Reference:
https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors

@techdragon
Copy link

this also throws an error

*[class|="has-background"] {
    background: #efefef;
    padding: 7px;
    border: 1px solid #888;
    margin-bottom: 5px;
    }

spits out

error: invalid attribute name in attribute selector

it seems that http://css2sass.heroku.com/ can correctly parse it, so i'm suspecting its libsass at work here.

@akhleung
Copy link
Author

akhleung commented Feb 1, 2014

Hmm, seems to be the |= operator that LIbSass doesn't like; thanks for the report. Also, whenever you find a valid bug in a closed ticket, please re-open the ticket -- otherwise it might fall through the cracks!

@akhleung akhleung reopened this Feb 1, 2014
@kennethormandy
Copy link

@hcatlin Unfortunately in that case, only people with commit access or the person who opened the issue can re-open it.

@akhleung
Copy link
Author

akhleung commented Feb 3, 2014

Okay, I pushed a fix to master. Please give it a try!

@akhleung akhleung removed their assignment Jun 6, 2014
mgreter added a commit to mgreter/sass-spec that referenced this issue Apr 22, 2016
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

5 participants