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
Inline styles do not parse ! important
correctly due to extra whitespace
#4125
Comments
has this issue been resolved ? is no can you assign it to me ? |
@HermanBide Feel free to grab it if you'd like! No need for assignments :) |
what folder/file can i find this code ? |
I believe the buggy code is here:
In order to reproduce the test failure, you will also need to check out 8136599 and run |
I ran |
Hi @HermanBide, you may need to check out the commit first. Try running these commands: git clone git@github.com:salesforce/lwc.git
cd lwc
git checkout 81365992e05585daadc4b17a9184ab7bfdb9b54a
yarn
DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn test:karma Unfortunately we do not have a Discord/Slack community server at this time. |
I get this when i run
|
@HermanBide Are you running on Windows? On Windows you may need to test in Windows Subsystem for Linux, or else find another way to set the global On my machine (MacOS), I am able to run the above commands verbatim and I get the error:
|
Yes i am running on window. i do not get those errors |
Please try running |
ca we zoom ? i honestly do not see the error when i run that command in the terminal |
I'm sorry, but we do not have the resources to help external contributors one-on-one. I would recommend using Windows Subsystem for Linux, or a Mac/Linux device. I don't believe any of the regular contributors to LWC use a Windows machine, and so it's possible things will be broken. 😕 I just checked, and these instructions are still reproducing the error for me, on a Mac. |
Hey Nolan,
But for above example which you have provided:
It's not even applying the color attribute to the text. |
Correct, the |
Thanks @nolanlawson for the explanation. I'll hit a try to resolve. |
The above should render with
color: red
having a priority ofimportant
. However, it loses theimportant
priority because, when the static content optimization is not active, we do not parse theimportant
priority correctly (due to the whitespace:! important
).Repro Karma test: 8136599
This test will succeed when the static content optimization is enabled, but it will fail when using
DISABLE_STATIC_CONTENT_OPTIMIZATION=1
. The reason it succeeds with the optimization is because we leave thestyle
attribute alone and don't try to format it.See also: #3548.
The text was updated successfully, but these errors were encountered: