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.

Some stylus variables are not available

See original GitHub issue

Software version

Quasar: 0.16.0 OS: OSX Node: 8.9.1 NPM: 5.7.1 Browsers: Chrome

What did you get as the error?

I’m trying to use some style variables from here https://quasar-framework.org/components/stylus-variables.html in app.styl. I found that some variables are not available when imported. This is my code:

@import '~variables'

.border-1
  border 1px solid $form-autofill

.border-2
  border 1px solid $item-separator-color

.border-1 works as expected, in the browser I got border: 1px solid #ff9800;

.border-2 doesn’t works, this is the result in the browser: border: 1px solid $item-separator-color;

I tried with other variables with mixed results, some work fine others do not work.

What were you expecting?

I want to use all the variables available here https://quasar-framework.org/components/stylus-variables.html when importing with @import '~variables

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rstoenescucommented, Jun 16, 2018

You might want to also @import 'quasar-framework/src/css/variables.mat/ios.styl' after the initial variables. There are some theme specific variables that apply only to one of the two themes, so if you build for both themes you need to have this in mind.

0reactions
rstoenescucommented, Jun 18, 2018

The mat/ios was meant for you to pick one theme 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stylus variable interpolation not working in the animation ...
I'm having a lot of trouble getting variable interpolation to work consistently in Stylus. Using the version of it currently on CodePen here,...
Read more >
Stylus extension rejects valid Stylus CSS variable syntax
The Stylus extension has an ability to run a Stylus css language preprocessor (yay same names) on userstyles.
Read more >
How to Use Vue CSS Variables - Reactive Styles RFC
CSS Variables are not available in the child component. To avoid inheritance issues, CSS variables defined are not available to any of its...
Read more >
[Solved] Problem using some style variables - Quasar forum
I'm trying to use stylus variables in my own styles, but apparently some variables are not working. On the example below, $grey is...
Read more >
Working with CSS - Vue CLI
You can select pre-processors (Sass/Less/Stylus) when creating the project ... For example, to pass some shared global variables to all your ...
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