Skip to content
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

Scope: CSS Extend fix #31

Merged
merged 4 commits into from
Oct 13, 2018
Merged

Scope: CSS Extend fix #31

merged 4 commits into from
Oct 13, 2018

Conversation

ItsJonQ
Copy link
Contributor

@ItsJonQ ItsJonQ commented Oct 13, 2018

Scope: CSS Extend fix

This update fixes the styled(Component) extending functionality with Emotion.

The issue was that the cssWithScope function was comparing the SCOPED namespace
rather than the CSS selector. This wasn't compatible with Emotion's
cache consolidator, which resulted in scoped classes NOT being able to be
extended.

Some very crude tests.

Before:

screen shot 2018-10-12 at 9 36 20 pm

After:

screen shot 2018-10-12 at 9 33 59 pm

Notice how in the After pic, both lines only have 2 classes, whereas the Before pic, it was 2 and 3.

Resolves: #27

Jon Q added 2 commits October 12, 2018 21:42
This update fixes the styled(Component) extending functionality with Emotion.

The issue was that the cssWithScope function was comparing the SCOPED namespace
rather than the CSS selector. This wasn't compatible with Emotion's
cache consolidator, which resulted in scoped classes NOT being able to be
extended.
@ItsJonQ ItsJonQ added the bug Something isn't working label Oct 13, 2018
@ItsJonQ ItsJonQ self-assigned this Oct 13, 2018
@coveralls
Copy link

coveralls commented Oct 13, 2018

Pull Request Test Coverage Report for Build 193

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 189: 0.0%
Covered Lines: 73
Relevant Lines: 73

💛 - Coveralls

@ItsJonQ ItsJonQ merged commit 4a96b8d into master Oct 13, 2018
@ItsJonQ ItsJonQ deleted the scope-css-extend-fix branch November 8, 2018 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Styled: Fix order of operations
2 participants