-
Notifications
You must be signed in to change notification settings - Fork 20
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! removes spaces with multi-values. #104
Comments
For anyone who may experience this, just separate your css for the time being, e.g.
|
This is expected as we current do not have a way to know the spacing between tokens. So inline syntax will make a guess about whether spacing should present until proc_macro_span is stablised which is not 100% accurate. Trying to insert spacing in the value position also does not work because it can also be used like: You can use the string literal syntax to avoid this issue. |
I am labeling this as documentation as this should be documented until a solution is available. |
It should be made more clear that the whitespace issue does not only apply to descendent selectors. Nowadays,
I'm not 100% sure if every compiler stage preserves the original source text, or if a synthetized string might mess things up and lead to inconsistent compilations. I'm almost sure that the returned string is not considered a cache key for incremental compilation, so relying on it's value could also lead to non-reproducible builds. |
Using the css! macro provided by styled_component, I am seeing the spaces omitted which is resulting in faulty css.
The problem is with:
border: ${BORDER_WIDTH} solid ${border};
The text was updated successfully, but these errors were encountered: