Skip to content

New css interface#1129

Merged
kof merged 13 commits intomasterfrom
css
Jun 14, 2019
Merged

New css interface#1129
kof merged 13 commits intomasterfrom
css

Conversation

@kof
Copy link
Copy Markdown
Member

@kof kof commented Jun 12, 2019

Implements #747, for now just objects syntax.

@kof kof requested a review from HenriBeck as a code owner June 12, 2019 21:23
@kof kof self-assigned this Jun 12, 2019
@kof kof requested review from HenriBeck and removed request for HenriBeck June 12, 2019 21:24
Comment thread packages/css-jss/package.json
Comment thread packages/css-jss/src/createCss.js Outdated
Comment thread packages/css-jss/src/index.js Outdated
export type {Css, Style}

export const create = (sheet?: StyleSheet): Css => {
if (sheet) defaultSheet.detach()
Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member Author

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.

Comment thread packages/css-jss/src/index.js Outdated
use createCss directly

Co-Authored-By: Henri <henribeck.dev@gmail.com>
Comment thread packages/css-jss/src/types.js Outdated
@kof kof requested a review from HenriBeck June 14, 2019 12:07
@kof
Copy link
Copy Markdown
Member Author

kof commented Jun 14, 2019

merging it now to make it into the next alpha, if you find anything else, write it here or #747

@kof kof closed this Jun 14, 2019
@kof kof reopened this Jun 14, 2019
@kof kof merged commit 0af646d into master Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants