-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
New css interface #1129
New css interface #1129
Conversation
packages/css-jss/src/index.js
Outdated
export type {Css, Style} | ||
|
||
export const create = (sheet?: StyleSheet): Css => { | ||
if (sheet) defaultSheet.detach() |
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.
Why would we detach in such a case? The user still could have used the default sheet
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.
Yeah, not sure what to do here, the problem I see is that if user creates custom jss/sheet, this sheet will already be in the DOM with no rules.
So maybe I need to additionally check if there are rules
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.
Would this be a big benefit? I don’t think it will make a big difference in performance
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.
Just the fact that there would be an empty style tag in the head, though evtl it doesn't matter for client side and won't happen on the server so fuck it, I am removing the line.
use createCss directly Co-Authored-By: Henri <henribeck.dev@gmail.com>
merging it now to make it into the next alpha, if you find anything else, write it here or #747 |
Implements #747, for now just objects syntax.