question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LESS mixin and extend breaks CSSComb

See original GitHub issue

Till recently I had no problem using CSSComb on LESS files in Sublime Text 2. Now, with ST3, I get an error on my LESS files. I have found that the error appears when I use a mixin with a negative number, like so .text-indent(-16px); or an extend like so &:extend(._pill-button);

But I haven’t checked all my files to see if something else bothers CSSComb.

The error message is: /Users/ellen/Library/Application Support/Sublime Text 3/Packages/CSScomb JS/node_modules/csscomb/lib/csscomb.js:205 throw new Error('Parsing error at ’ + filename + ': ’ + e.message) ^ Error: Parsing error at undefined: Please check the validity of the CSS block starting from the line #15 at Object.Comb.processString (/Users/ellen/Library/Application Support/Sublime Text 3/Packages/CSScomb JS/node_modules/csscomb/lib/csscomb.js:205:19) at Socket.<anonymous> (/Users/ellen/Library/Application Support/Sublime Text 3/Packages/CSScomb JS/csscomb.js:23:37) at Socket.EventEmitter.emit (events.js:117:20) at _stream_readable.js:919:16 at process._tickCallback (node.js:419:13)

If I remove the offending line, or just the minus sign when that is the problem, it works fine

Ellen

<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:3
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jdaltoncommented, May 6, 2019

This is fixed in the latest csscomb release 🎉

0reactions
Kevnzcommented, Oct 18, 2017

This is still an issue, any idea of what is going on, or is this not going to be sorted or even a point in the a direction to look at ways to fix it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extend sort-order, add option to sort specific mixins by name
I want to use the dev version of csscomb because of the sort-order feature adjustments. How can I manually drop the dev version...
Read more >
LESS differences between mixin and extend - Stack Overflow
In short: extend simply appends current selector to a list of selectors it "extends" while mixin expands its contents into the ruleset you ......
Read more >
Extending In Sass Without Creating A Mess
The @extend directive in Sass is a powerful directive that facilitates the sharing of rules and relationships between selectors.
Read more >
Sass Guidelines
Sass is an extension of CSS that adds power and elegance to the basic language. Sass' ultimate objective is to fix CSS' flaws....
Read more >
Bootstrap 3.1.0 released
Rather than bloat the main project with support for Less and Sass—and all the ... class and mixin by switching to &:extend(.clearfix all)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found