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

[ShadyCSS] Incorrect parsing of string literals with colons in them leads to FUBAR rules #41

Open
n1ywb opened this issue Jul 24, 2017 · 1 comment

Comments

@n1ywb
Copy link

n1ywb commented Jul 24, 2017

When writing an attribute selector with a string literal with a colon in it, shadycss puts the scoped-style rules INSIDE THE STRING LITERAL right after the colon. e.g.

iron-icon[icon="emerson-icons:onhold"]

should get rewritten as

iron-icon[icon="emerson-icons:onhold"]:not([style-scope]):not(.style-scope)

but instead becomes

iron-icon[icon="emerson-icons:not([style-scope]):not(.style-scope):onhold"]

I was able to work around the issue by using the CSS character code for the colon char

iron-icon[icon="emerson-icons\003Aonhold"]

is rewritten as

iron-icon[icon="emerson-icons\003Aonhold"]:not([style-scope]):not(.style-scope)

I tried to write a test for this but the tests seem to be broken, see my other ticket webcomponents/shadycss#118

@dfreedm dfreedm self-assigned this Aug 11, 2017
@dfreedm dfreedm transferred this issue from webcomponents/shadycss Jun 7, 2019
dfreedm added a commit that referenced this issue Jun 11, 2019
@dfreedm dfreedm changed the title Incorrect parsing of string literals with colons in them leads to FUBAR rules [ShadyCSS] Incorrect parsing of string literals with colons in them leads to FUBAR rules Jun 12, 2019
dfreedm pushed a commit that referenced this issue Jun 12, 2019
patch Node.prototype.baseURI
@stale
Copy link

stale bot commented Apr 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 22, 2021
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

3 participants