Skip to content

[selectors] Add a "case-sensitive" attribute-matcher flag #3282

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

Closed
tabatkins opened this issue Nov 2, 2018 · 2 comments
Closed

[selectors] Add a "case-sensitive" attribute-matcher flag #3282

tabatkins opened this issue Nov 2, 2018 · 2 comments
Labels
selectors-4 Current Work

Comments

@tabatkins
Copy link
Member

A while back we added a "case-insensitive" flag for attribute-matching, to help model how a number of HTML attributes matched their value case-insensitively.

However, per whatwg/html#4158, the type attribute, at least, always matches case-insensitively, no matter whether you provide the flag or not. (This is a legacy weirdness thing, not an intentional design.) This, then, makes it actually impossible to implement the ol styling rules in CSS; they can only be applied magically or via JS examining the actual value of the attribute.

Perhaps we could add a "case-sensitive" flag that forces matching to be done case-sensitively, even in cases like this where it's case-insensitive by default? @annevk suggests a c, which is as good as anything else.

@Loirooriol
Copy link
Contributor

Dupe of #2101?

@tabatkins
Copy link
Member Author

Indeed, thanks! Closing this in favor of discussion over there.

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

No branches or pull requests

3 participants