-
Notifications
You must be signed in to change notification settings - Fork 25.7k
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 selector [title~="flower"] doesn't work with view encapsulation #9644
Comments
A plunker to reproduce would be great |
Do you need further information for this issue? I want to build a little widget and need a fix for it. If you tell me where the css code is written to the html head, I could try to fix it on my own and create a pull request. I think it's somewhere within the ShadowCss class (shimCssText()), but I havn't debugged yet. Btw. one[attr~="value"] is missing within the unit tests. |
The problem is the tilde within the seperators list within shadow_css.ts (line 429). My idea to remove the tilde from there doesn't work for the selector Another solution could be to edit the final string with something like this: var scopeSelectorExpression = new RegExp(
I don't really like this solution, but it should solve the problem. I can't be sure because the unit tests aren't running locally. |
Change the seperator regular expression to ignore tildes which are followed by an equal sign. Closes #9644
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a ...
Current behavior
I have the following code:
And Angular create this:
If I run the code the text color for "Test 1" turns blue and "Test 2" is still black. But if I change the code as followed within the Chrome debugger, "Test 2" will become red.
I don't see the reason for this behavior but for me it seems to be wrong.
The results were the same on Chrome and Firefox on a windows machine with angular rc1 and rc3. If encapsulation is set to ViewEncapsulation.None the css code works as expected, but I need the encapsulation.
The text was updated successfully, but these errors were encountered: