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.

support for css vars

See original GitHub issue

atm if we have

:root {
   /* some vars */;
}

anywhere in file, you get an error

TypeError: Cannot read property 'first' of null

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:7

github_iconTop GitHub Comments

3reactions
alecdwmcommented, Mar 12, 2020

While we wait for a new release, here’s a workaround you can use if you invoke csscomb from the command line:

package.json

{
  "scripts": {
    "fmt": "node node_modules/csscomb/src/cli.js -c .csscombrc src",
  },
  "devDependencies": {
    "csscomb": "csscomb/csscomb.js#1f27f9e4e0f6a9f0849b6fc6e8325baf9371aeaf",
  }
}

The hash 1f27f9e4e0f6a9f0849b6fc6e8325baf9371aeaf refers to the commit containing the fix.

If you invoke csscomb directly you’ll see an error like this:

Error: Cannot find module '../lib/cli'

So instead I am using node node_modules/csscomb/src/cli.js.

2reactions
Manyakacommented, Feb 11, 2020

Any news about this issue? I use csscomb and I like it, but it does not work with css vars 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS Variables (Custom Properties) | Can I use... Support ...
CSS Variables (Custom Properties). - CR. Permits the declaration and usage of cascading variables in stylesheets. Usage % of. all users, all tracked ......
Read more >
Using CSS custom properties (variables) - MDN Web Docs
Custom properties (sometimes referred to as CSS variables or cascading variables) are entities defined by CSS authors that contain specific ...
Read more >
Browser Compatibility Testing of CSS Variables - LambdaTest
BROWSER SUPPORT FOR CSS Variables (Custom Properties) · Google Chrome · Mozilla Firefox · Internet Explorer · Safari · Microsoft Edge · Opera....
Read more >
CSS Variables - The var() function - W3Schools
The var() function is used to insert the value of a CSS variable. CSS variables have access to the DOM, which means that...
Read more >
@supports with CSS Variables - CodePen
Demo illustrating how to use CSS feature queries to detect support for CSS variables. The demo accompanies the following article for SitePoint: A...
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