Skip to content

Selector contains "!important" when there is no whitespace following a mixin #90

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

Closed
orottier opened this issue Sep 22, 2017 · 1 comment

Comments

@orottier
Copy link
Contributor

  • Node Version: 6.11.1
  • NPM Version: 5.3.0
  • postcss-less Version: 1.1.0

LESS

a {
    .mixin(val)!important;
}

JavaScript

console.dir(require("postcss-less").parse('a{.mixin(val)!important;}'), {colors: true, depth: null})

Expected Behavior

{
            selector: '.mixin(val)',
            params: '(val) !important',
            mixin: true,
            important: true
}

Actual Behavior

{
            selector: '.mixin(val)!important',
            params: '(val)!important',
            mixin: true,
            important: true
}

Going upstream from prettier/prettier#2880

@shellscape
Copy link
Owner

Would be happy to review a PR for a fix for this

shellscape pushed a commit that referenced this issue Oct 2, 2017
* Add failing test for #90

* Fix #90, whitespace between mixin and !important is optional

* Make test for !important case insensitive, #89

* Use test() instead of match() as we dont care about the actual matches
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

No branches or pull requests

2 participants