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

selectorText is case-sensitive #7

Open
4poc opened this issue Aug 14, 2012 · 2 comments
Open

selectorText is case-sensitive #7

4poc opened this issue Aug 14, 2012 · 2 comments

Comments

@4poc
Copy link

4poc commented Aug 14, 2012

First thanks for that lib! I had a problem jss not working at all, this was the problem:
// Browsers report selectors in lowercase
if (selector) selector = selector.toLowerCase();

"Browsers report selectors in lowercase", Are you sure that is true? I tested Opera, Firefox and Chromium it doesn't looks like it.

@blq
Copy link

blq commented Nov 2, 2012

I can confirm this is the case (Chrome 22).

@barneycarroll
Copy link

selectorText also strips redundant whitespace (eg returns), which causes a similar silent failure because JSS creates the rule and then iterates through the output stylesheet looking for a match with the raw input before assigning properties.

I see the wisdom of relying on native CSSOM for a lot of the crucial work, but when nuts & bolts methods break because their own internals are erroneous, it becomes a problem.

I think this could be forked such that the internal methods checked to cache the output selector they had created and match against that… It would also avoid later iteration, I think.

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