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

Fix multiple nested selectors in media queries #324

Merged
merged 4 commits into from
Sep 22, 2017

Conversation

emmatown
Copy link
Member

What:

Fix multiple nested selectors in media queries

Why:

Closes #323

How:

The last argument to stylis plugins is an id which is 0 in context 2 if the style is not in a media query.

Checklist:

  • Documentation N/A
  • Tests
  • Code complete

@apostolos I checked this with your test cases(Thanks so much!!!) and it works for all of them except ExampleP1 where the whole thing is black. From what I can see this is correct since there is no color: blue in ExampleP1. If you disagree please reopen the issue.

@codecov
Copy link

codecov bot commented Sep 22, 2017

Codecov Report

Merging #324 into master will decrease coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #324      +/-   ##
==========================================
- Coverage   96.37%   96.32%   -0.06%     
==========================================
  Files          16       16              
  Lines         580      571       -9     
  Branches      141      138       -3     
==========================================
- Hits          559      550       -9     
  Misses         16       16              
  Partials        5        5
Impacted Files Coverage Δ
packages/emotion/src/index.js 99.11% <100%> (-0.07%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2000d49...48ba046. Read the comment docs.

@emmatown emmatown merged commit d50dfaa into master Sep 22, 2017
@emmatown emmatown deleted the multiple-nested-selectors-in-media-query-fix branch September 22, 2017 05:12
@apostolos
Copy link
Contributor

@mitchellhamilton You are correct, P1 should have said "black" not "blue". I can confirm that all issues have been fixed, both for the test cases and across my entire project.

Amazing work, many thanks! LWJGL.org is now live in production with emotion@8

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.

Media queries still inject styles when they shouldn't @8.0.2-2
2 participants