-
Notifications
You must be signed in to change notification settings - Fork 267
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 prop does not override if provided without enclosing { } #61
Comments
Has this been fixed? I am not seeing my styles what so ever even with the
Neither of these are working. @davidhu2000 |
I see the issue now. This actually do not override the existing styles.
I need to pass the new styles in as an array
That will actually override the old style. Getting a fix for this soon. |
@tbaustin @synchronos-t can you check |
@davidhu2000 I'm on v0.5.12, and I don't see the styles overwriting. I used both methods as described by @tbaustin . |
@bbmoz can you post the exact code you used? so i can try to reproduce |
Here is the code I used: <PacmanLoader
color='yellow'
loading
margin='2px'
size={20}
sizeUnit='px'
css={css`
margin-top: 24px;
left: 50%;
transform: translateX(-40px);
`}
/> There is more to the above to provide context, but in terms of code relevant to the library, this is it. Thanks for the help! |
This issue still persists in 0.6.1 |
Still seeing this in 0.81 even. |
Still seeing this in 0.9.0 even. |
reopening the issue for further investigation. Can you provide a code sample to help reproduce? |
Hi, Please have a look at this codesandbox example. Cheers |
so taking off this code fixes the overriding issue.
However, without that, now this code no longer works
I see an output
Adding a comment to document this issue. Not sure how to solve it right now. |
something worth noting is all the loaders include
https://github.com/davidhu2000/react-spinners/blob/master/src/CircleLoader.tsx#L1 I wonder if that need to be removed and use |
Is this fixed? |
This is still an issue for me. |
this issue should be fixed in 0.13.0-alpha.5, so closing this for now. feel free to reopen if there are issues |
This is a bug report. react-spinners version 0.5.3.
The
css
prop is documented to override the default css, but it does not actually do this, if used like in the documentation, for example like this in my case:The
display: block;
is correctly added, but in a way that it does not override the defaultdisplay: inline-block
(the respective<style data-emotion="css"></style>
is added earlier in the DOM).However, if I enclose the css string in { } inside the template literal, it does override:
This seems to be the way the default styles are written as well. I'm not experienced with emotion-js, so I cannot explain why that makes the object precedence work as intended, but it seems that's how it works.
The text was updated successfully, but these errors were encountered: