forked from styled-components/styled-components
-
Notifications
You must be signed in to change notification settings - Fork 0
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
restore PR #450, Fix defaultProps used instead ThemeProvider on first render #1
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
santaclauze
commented
Mar 22, 2017
- fix issues: [V2] Theming doesn't work with reactstrap 4.2.0 styled-components/styled-components#574, [V2] Using anchor with react-router break styled <ThemeProvider /> styled-components/styled-components#549
- This change has not included in this commit
These test failures are actually not really failures, they just happened because we now call the name generator (which we patch for the tests) on component creation as well as at rendering time, which didn't happen before, so now all classes are shifted by one. Fixed by manually shifting them back.
To add support for server-side rendering, it needs to be possible to pass in an identifier from the outside. This is a private API because the only thing ever writing this is babel-plugin-styled-components, which will automatically turn your normal styled components into the ssr compatible version by turning your styled() calls into this notation: styled({ target: 'div', identifier: 'YourComponent-asdf123', displayName: 'YourComponent' }) This commit adds support for this notation.
Package size (min+gzip) with... - PostCSS: 21kB - stylis: 9kB :tada: I hack around stylis model a bit, because we e.g. don't want to prefix keyframes with the generated classname. (something stylis does by default). Maybe @thysultan can chime in here if there's any chance we could change this, otherwise this (slightly ugly) works too! This isn't done as we need to do dependency cleanup and fix the whitespace changes in the tests, but I wanted to kick off a first discussion! /cc @geelen
…on' into per-component-classname-generation Conflicts: src/models/StyledComponent.js
…name-generation Conflicts: CHANGELOG.md
…v/styled-components into vdanchenkov-warn-too-many-classes
Conflicts: CHANGELOG.md yarn.lock
…ding Explicit extending syntax
The constructors weren't passing through their arguments to React.Component, which causes Rapscallion to fail.
…x-comp-constructor Fix component constructors not passing through arguments to React.Component (V2)
…eprocessed Accept preprocessed CSS from babel plugin
…Provider on first render
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.