-
Notifications
You must be signed in to change notification settings - Fork 186
Allow overridden styles to re-order in generated CSS #279
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -258,6 +258,34 @@ ${formatStyles(actual)} | |
| }`, defaultSelectorHandlers); | ||
| }); | ||
|
|
||
| it('orders overrides in the expected way', () => { | ||
| assertCSS('.foo', [ | ||
| { | ||
| "@media (min-width: 400px)": { | ||
| padding: 10, | ||
| } | ||
| }, | ||
| { | ||
| "@media (min-width: 200px)": { | ||
| padding: 20, | ||
| }, | ||
| "@media (min-width: 400px)": { | ||
| padding: 30, | ||
| } | ||
| } | ||
| ], ` | ||
| @media (min-width: 200px){ | ||
| .foo{ | ||
| padding:20px !important; | ||
| } | ||
| } | ||
| @media (min-width: 400px){ | ||
| .foo{ | ||
| padding:30px !important; | ||
| } | ||
| }`, defaultSelectorHandlers); | ||
| }); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we have a test to make sure string handlers still work correctly?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are some tests for string handlers. Is there a specific test you think I should add?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to make sure that string handlers don't end up at the end of style declarations. I'm less worried about this now that the argument is inverted, though. :)
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, there is a test that verifies that already. That's actually how I ended up making this an argument in the first place since I broke that test in my initial pass. |
||
| it('supports custom string handlers', () => { | ||
| assertCSS('.foo', [{ | ||
| fontFamily: ["Helvetica", "sans-serif"] | ||
|
|
||
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.
👍