-
-
Notifications
You must be signed in to change notification settings - Fork 111
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-in-JS #101
CSS-in-JS #101
Conversation
Size Change: -7 B (0%) Total Size: 3.98 kB
|
c6491e7
to
aa35c37
Compare
@molefrog Can you take a look? |
@rschristian I would be glad to hear your opinion as well ❤️ |
Codecov Report
@@ Coverage Diff @@
## master #101 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 31 32 +1
Lines 402 411 +9
Branches 53 54 +1
=========================================
+ Hits 402 411 +9
Continue to review full report at Codecov.
|
All looks good! Just a thought: if I decide to override the styles with my own ones, how will I be able to tell react-colorful to ignore the default styles? I mean I would have to deal with conflicting CSS in that case, right? |
Right. But, at the same point, the component's styles are too complex to write from scratch. |
@omgovich Yeah, you are right. I guess for the sake of backward-compatibility, the proposed solution is really good! The only downside is that once you upgrade, you're going to see an error that the styles are missing. But imo, with a good migration message in the README, this might be doable. |
So I see two options here:
|
My plan is to release it as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By all means, looks great to me.
A lot of projects having trouble installing react-colorful because they do not have any CSS-loader.
Also, it blocks many developers from including our library as part of their public component libraries since most of them are 100% CSS-in-JS.
For example, I wanted to add react-colorful to react-three-gui but this project bundles via
tsdx
and do not support .css at all.Solution: move the styles of our picker to JS.