Skip to content

!important is being moved out of mixin call parameters #102

@srmcconomy

Description

@srmcconomy
  • Node Version: 8.9.1
  • NPM Version: 5.6.0
  • postcss-less Version: 1.1.5

If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.

LESS

.f(
	@a : {
		color : red !important;
		background : blue;
	}
);

JavaScript

const fs = require('fs');
const less = require('postcss-less');
const postcss = require('postcss')

const filePath = './test.less';
const file = fs.readFileSync(filePath);
const processor = postcss();
processor.process(file, { syntax: less, from: filePath }).then(result => {
  console.log(result.root.toString());
});

Expected Behavior

result.root.toString() should output the provided less file, completely unchanged

Actual Behavior

output is:

.f(
	@a : {
		color : red;
		background : blue;
	}
) !important;

How can we reproduce the behavior?

Running the js/less provided

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions