-
Notifications
You must be signed in to change notification settings - Fork 9
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 class + element matches #8
Conversation
@@ -35,7 +35,7 @@ rules: | |||
computed-property-spacing: [2, "never"] | |||
|
|||
space-unary-ops: [2, {"words": true, "nonwords": false}] | |||
space-after-keywords: [2, "always"] | |||
keyword-spacing: [2, {"before": true, "after": true}] |
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.
@MoOx I need your confirmation that this is the correct configuration. When I upgraded the package the configuration changed to this style. Please confirm that this is correct.
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.
lgtm
@@ -33,7 +48,9 @@ function explodeSelector(selector, options) { | |||
|
|||
let newParts | |||
if (postSelectors.length === 0) { | |||
newParts = bodySelectors.map((s) => preWhitespace + pre + s) |
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.
This is actually the issue right now. Because the pre
is a class selector and s
is an element selector we need to flip the concatenation.
} | ||
|
||
function normalizeSelector(selector, preWhitespace, pre) { | ||
selector = selector === undefined ? "" : selector |
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.
@MoOx why would I have a undefined selector?
Thanks a lot |
@MoOx ups I was rebasing for squash the commit 😄 |
Can be done via github ui now ;) |
Related to #7 and MoOx/postcss-cssnext#287