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

"autoprefixer: ignore next" support #1027

Merged
merged 8 commits into from Apr 28, 2018
Merged

Conversation

@vostrik
Copy link
Contributor

@vostrik vostrik commented Apr 27, 2018

#1024 Added support for comment "autoprefixer: ignore next"

/* autoprefixer: ignore next */
ingore-rule {
mask: none;
background: linear-gradient(to bottom, white, black);

This comment has been minimized.

@ai

ai Apr 27, 2018
Member

We need prefixes here and inside next at-rule. This comment should affect only selector and at-rule params on next node.

Or we will need to think about combining ignore next and off/on.

This comment has been minimized.

@vostrik

vostrik Apr 27, 2018
Author Contributor

Fixed. Disable Autoprefixer only for selector, at-rule or property.

if (node.parent && node.parent.nodes) {
const nodeIndex = node.parent.nodes.indexOf(node);
if (nodeIndex > 0) {
const previousNode = node.parent.nodes[nodeIndex - 1];

This comment has been minimized.

@ai

ai Apr 27, 2018
Member

You can just call Node#prev shortcut

This comment has been minimized.

@vostrik

vostrik Apr 27, 2018
Author Contributor

Fixed

vostrik added 4 commits Apr 27, 2018
@ai ai merged commit fe77376 into postcss:master Apr 28, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants