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.

Feature request: Native css variables

See original GitHub issue

As far as I understand, at the given moment, all the stylys settings (colors, theme, etc.) are compiled into css as values.

This causes some inconvenience. For example, to change the primaty color of a theme, I have to integrate the sources into my project, redefine the $theme variable and compile the result.

How much easier it would be if the colors of the theme were set using the native CSS variable. In this case, redefining the color palette becomes much easier and more flexible. And the original code of the vuetifyjs is reduced.

:root {
  --primaryColor: #f06d06;
}

I understand that the use of native variables may not give all the possibilities as a stylus, but I am convinced that this is something to which one should strive.

I think you should take the parameters of the theme into native variables. And in the future expand other settings.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
nekosaurcommented, Apr 10, 2018

CSS variables is a no go as long as we support IE11. We can revisit this in the future if/when we decide to drop IE11.

0reactions
Xowapcommented, Aug 7, 2018

Damn, I should learn to read. The PR is already done. Awesome guys 👍

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 >
Custom properties (--*): CSS variables - MDN Web Docs
Custom properties are scoped to the element(s) they are declared on, and participate in the cascade: the value of such a custom property...
Read more >
Why I'm Excited About Native CSS Variables - Philip Walton
Native CSS variables weren't just an attempt to copy what CSS preprocessors could already do. In fact, if you read some of the...
Read more >
A user's guide to CSS variables – Increment: Frontend
CSS variables are custom properties that cascade normally and even inherit. They start with a reserved -- prefix, and there are no real...
Read more >
CSS Variables — No, really! - Medium
1. CSS variables are a BIG deal. Developers have asked for this feature for years, and genuine native browser support has been a...
Read more >

github_iconTop Related Medium Post

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