-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Should be able to append CSS classes #264
Comments
@rikusen0335 Thank you for your feature request idea contribution to the project! There is another major rewrite underway that will change how the component is consumed, and it will allow you to do what you require with styling. I don't know when version 5 will be available, and I will keep this issue open until it is resolved. Thanks again. |
Thank you for answering! I am looking forward to it 🥇 |
Update on v5 FYI: #274 |
@rikusen0335 I'm working on things and am unsure how I want to go about this. At present, you can override/add on to the default styles, but passing a single
I know it's been a while, and thank you for your time. Here's the latest update on the work being actively done! #274 (reply in thread) |
You probably need to override classes into every element, like if you making the lib, I mean like: const Zoom = ({ baseClasses, secondClasses, src }) => {
return (
<div className={`base ${baseClasses}`}>
<figure className={`second ${secondClasses}`}>
<img src={src} />
</figure>
</div>
)
} So, because recent CSS-in-JS stuffs are bit difficult to use css selectors. |
That seems like potentially a lot of classes to accept and use; in the Don't all the CSS-in-JS provide options to break out of their modules? E.g.,
Using the example from https://emotion.sh/docs/nested, here's how you would target const myTextWithNestedImg = css`
color: purple;
[data-rmiz] { /* some styles here */ }
` Or going with the global approach from emotion: <Global
styles={css`
[data-rmiz] { /* some styles here */ }
[data-rmiz-content] { /* some styles here */ }
`}
/> |
Ohh I didn't expect how that way can be done. That seems great, so I'd choose css selector way now. |
I even didn't anything xD |
You asked a question and thought through some ideas with the hopes of making the project better! That is a contribution ❤️ |
This issue is a:
Description
Currently you can add CSS styles with
wrapStyle
prop, but we need to add css throughstring
like:Because there's some cases to use CSS Modules or utility first css frameworks like Tailwind CSS.
The text was updated successfully, but these errors were encountered: