Skip to content

Bogus CssSyntaxErrors in 1.1.4 #99

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
Nikerabbit opened this issue Mar 21, 2018 · 7 comments
Closed

Bogus CssSyntaxErrors in 1.1.4 #99

Nikerabbit opened this issue Mar 21, 2018 · 7 comments

Comments

@Nikerabbit
Copy link

  • Node Version: v7.0.0 (also tested v9.8.0)
  • NPM Version: 3.10.8 (also tested 5.6.0)
  • postcss-less Version: 1.1.4

LESS

https://github.com/wikimedia/mediawiki-extensions-ContentTranslation/blob/0cacd98f21a0d378032a246189404e9e13680bc6/modules/dashboard/styles/ext.cx.dashboard.less
https://github.com/wikimedia/mediawiki-extensions-ContentTranslation/blob/0cacd98f21a0d378032a246189404e9e13680bc6/modules/ui/styles/mw.cx.ui.Columns.less

Errors

modules/dashboard/styles/ext.cx.dashboard.less
 12:3  ✖  Unexpected }   CssSyntaxError

modules/ui/styles/mw.cx.ui.ToolsColumn.less
 8:1  ✖  Unexpected }   CssSyntaxError

Expected Behavior

No error or valid error. mw.cx.ui.Columns.less doesn't even have } anywhere near line 8. It is not clear to me what is special in these two files to cause such errors.

Actual Behavior

Error that does not seem to make any sense.

How can we reproduce the behavior?

Using version 1.1.4. Downgrading to 1.1.3 error does not happen.

git clone git@github.com:wikimedia/mediawiki-extensions-ContentTranslation.git
cd mediawiki-extensions-ContentTranslation
git checkout 0cacd98f21a0d378032a246189404e9e13680bc6
npm install
./node_modules/.bin/grunt stylelint

If you now edit package.json to force version 1.1.3 and install again, tests will pass.

Do note that you might encounter wikimedia/grunt-stylelint#49 – but you can still see that it is failing or passing.

wmfgerrit pushed a commit to wikimedia/mediawiki-extensions-ContentTranslation that referenced this issue Mar 21, 2018
shellscape/postcss-less#99

Bug: T190248
Change-Id: Ic16888f5b5938542f144448a16108dc13f7f6c5f
@YuliaTsareva
Copy link

We also have an issue with 1.1.14 (via stylelint).

It shows an error on the line with @import.

 Unknown word (CssSyntaxError)] [CssSyntaxError] Unknown word (CssSyntaxError)

@yesmeck
Copy link

yesmeck commented Mar 21, 2018

yesmeck added a commit to ant-design/ant-design that referenced this issue Mar 21, 2018
@shellscape
Copy link
Owner

@yesmeck @YuliaTsareva and anyone else visiting this repo. DO NOT post "me too" replies. Use the reaction button on the original post. I will delete any further "me too" replies on this issue.

@shellscape
Copy link
Owner

@HauptmannEck @catearcher looks like #97 broke some things for people. I'm going to have to revert that change until you all can find a fix.

@shellscape
Copy link
Owner

@HauptmannEck @catearcher my mistake, it was #98 that introduced the problem.

@davidyorr I have reverted #98 and added sanity tests to the test suite. Using the first file that the OP provided, I can reproduce the error he's seeing, with your changes merged. I've left your tests in place, but commented out. You'll have to try another approach to resolving #92.

@Nikerabbit I'll be publishing a fix to NPM within the hour.

@Krinkle
Copy link

Krinkle commented Mar 22, 2018

Thanks! ⭐

@zeljkofilipin
Copy link

🎉

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

6 participants