-
-
Notifications
You must be signed in to change notification settings - Fork 400
Always use insertRule API with option link: true #857
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
Conversation
This PR seems to be ready |
Ok added a test with media query, its not ready, fixing it. |
@@ -34,7 +31,6 @@ export default class StyleSheet { | |||
constructor(styles: Object, options: StyleSheetOptions) { | |||
this.attached = false | |||
this.deployed = false | |||
this.linked = false |
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 did you remove the linked property?
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.
because we don't need it any more, if options.link is true, then it is always linked, there is no separate sheet.link() call.
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 makes sense
Should fix (still verifying) #815, #710, #664 |
Looks good to me |
Yeah, to me too |
Merged |
What would you like to add/fix?
Current linking logic causes too many bugs. This approach simplifies it. We are not linking any more using selector, we create rules using insertRule API always when we need to link a rule.
Corresponding issue (if exists):
Fixes #815, #710, #664