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

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

Closed
srmcconomy opened this issue Apr 19, 2018 · 2 comments · Fixed by #113
Closed

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

srmcconomy opened this issue Apr 19, 2018 · 2 comments · Fixed by #113

Comments

@srmcconomy
Copy link

  • 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

@shellscape
Copy link
Owner

Thanks for the issue 🍺 Would happily review a PR to resolve this.

@shellscape
Copy link
Owner

This is resolved with the work being done in #113

shellscape added a commit that referenced this issue Sep 19, 2018
shellscape added a commit that referenced this issue Sep 21, 2018
* chore: fix linting errors

* chore: de-esm

* chore: de-esm, start move to ava

* chore: move to circle

* chore: gulp to npm scripts, housekeeping

* chore: unfuck prev de-esm

* test: get root tests passing

* test: better integration tests

* test: finish ava migration

* chore: clean up package, add code coverage

* chore(ci): fix lint script

* test: ignore postcss-parser-tests until after 7.x update

* chore(ci): add node 6 to circle config

* fix: fixes #88, malformed filenames and missing semicolons in imports

* fix: fixes #89, case insensitive !important

* chore: keep the old parsers around for reference temporarily

* refactor: leverage postcss 7.0

* refactor: enable mixins

* chore: improve linting, fix variable parse, enable sanity check tests

* chore: get stringifying working

* chore: re-implement stringifying, update tests, remove old /lib

* test: add test for #110

* test: add test for #108

* chore: implement interpolation, update tests

* fix: fixes #102 and #86

* chore: code cleanup
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 a pull request may close this issue.

2 participants