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

CSS attribute substring selector not working with scoped styles #288

Closed
shawnhwei opened this issue Feb 15, 2017 · 2 comments · Fixed by #294
Closed

CSS attribute substring selector not working with scoped styles #288

shawnhwei opened this issue Feb 15, 2017 · 2 comments · Fixed by #294
Labels

Comments

@shawnhwei
Copy link

shawnhwei commented Feb 15, 2017

Example: https://svelte.technology/repl/?version=1.6.8&gist=6587ab0c1af69e07411f99b3bd8a6979

The svelte identifier attribute is getting injected into the attribute selector for some reason:

.someStyle[svelte-391727275], [svelte-391727275] .someStyle {
  color:red;
}
[class*="  another"][svelte-391727275], [class*="  [svelte-391727275] another"], [class*="[svelte-391727275]  another"], [svelte-391727275] [class*="  another"] {
  background:black;
}
@Rich-Harris
Copy link
Member

Confession time: the CSS parsing in Svelte is a giant hack — it's all regex-based. I would guess it's getting tripped up by the space character in " another". What we really need to do is use PostCSS to transform the CSS instead.

@Rich-Harris
Copy link
Member

This is fixed in 1.6.9 — thanks

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

Successfully merging a pull request may close this issue.

2 participants