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

[lit-html] styleMap fails when update contains priority directive #3767

Closed
regevbr opened this issue Mar 28, 2023 · 1 comment · Fixed by #3768
Closed

[lit-html] styleMap fails when update contains priority directive #3767

regevbr opened this issue Mar 28, 2023 · 1 comment · Fixed by #3768

Comments

@regevbr
Copy link
Contributor

regevbr commented Mar 28, 2023

Which package(s) are affected?

Lit Core (lit / lit-html / lit-element / reactive-element)

Description

When using styleMap with a priority, e.g. {color: 'red !important}, the first render works (as it uses string concatenation) but an update, e.g. {color: 'blue !important'}, will not work at all and will maintain the previous value.

Reproduction

The text color should be updated, but it is not:

https://lit.dev/playground/#gist=82856b2ea7bfaa75f1360ff1cf71862e

Workaround

I have not found a work around

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

2.7.0

Browser/OS/Node environment

not relevant

regevbr pushed a commit to regevbr/lit that referenced this issue Mar 28, 2023
regevbr pushed a commit to regevbr/lit that referenced this issue Mar 28, 2023
regevbr pushed a commit to regevbr/lit that referenced this issue Mar 28, 2023
regevbr pushed a commit to regevbr/lit that referenced this issue Mar 28, 2023
regevbr pushed a commit to regevbr/lit that referenced this issue Mar 28, 2023
regevbr added a commit to regevbr/lit that referenced this issue Mar 28, 2023
@regevbr
Copy link
Contributor Author

regevbr commented Mar 28, 2023

I created a PR to fix the issue - #3768

regevbr added a commit to regevbr/lit that referenced this issue Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant