You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I pass a className that I define in my CSS, the style is overridden by the Precise UI component. I would expect my class to override the default component style.
Disclaimer: I am not a maintainer of this project.
@garethbjohnson this is not necessarily an issue with this library. This is the expected behavior of the styled-componentslibrary.
Looking quickly through the code it seems like the className property is just being passed down each styled component, so you will probably be able to override it based on the documentation.
@kbariotis I understand that this is caused by styled-components. However, I did not expect to have to know such a detail of the underlying third-party library in order to use Precise UI in this way. Additionally, I do not like the coupling of concerns in having to increase the specificity of the CSS declaration for each class that I pass to a Precise UI component. Further, I expect that passing className to add style would be a common approach for any project not using styled-components for internal styling. Thus, I do consider this to be an issue with this library.
To any maintainer reading this: if you expect users to increase the specificity of the CSS declaration for any passed className used for styling, then please document this prominently enough for them to read about it before trying it.
Bug Report
Prerequisites
Versions
1.1.1
Description
When I pass a
className
that I define in my CSS, the style is overridden by the Precise UI component. I would expect my class to override the default component style.Here is an example.
Steps to Reproduce
Expected behavior: The text would be red.
Actual behavior: The text is white.
Environment details: macOS 10.15.3, Chrome 80 and Firefox
The text was updated successfully, but these errors were encountered: