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
Wouldn't it be better to define the default value of the CSS variables in the CSS file and to not define them via the style prop?
That way, it's easy to modify them in another CSS file (without having to use !important).
If styling props are passed, define them individually via style.
The text was updated successfully, but these errors were encountered:
I'd gladly pass props directly through style; however, it's not always that easy because some spinners have multiple levels of children. If those props gets assigned to each child div, then customizing them with your own CSS class would be a nightmare (it's already quite involved in the source CSS).
Basically it comes down to: if you want to customize color, size, or thickness - pass those as props. In fact, I would very much prefer that everything (or as much as possible) is customizable with props only. If you need to change something that currently isn't exposed as a prop (e.g. margin), then passing your own CSS class is the way to go. So, depending on your situation, at least for now, you may want to use both.
What was your use case for a custom CSS class, may I ask? I could add those styles as props, so you wouldn't have to pass it.
I moved CSS var defaults from JS to CSS by the way (see v4.0.0). Not sure if this addresses your points, but let me know if I missed something. Thanks
Wouldn't it be better to define the default value of the CSS variables in the CSS file and to not define them via the
style
prop?That way, it's easy to modify them in another CSS file (without having to use
!important
).If styling props are passed, define them individually via
style
.The text was updated successfully, but these errors were encountered: