1

I'm using Quasar 2.17.7.

If I have the below styles in my quasar.variables.scss file:

$company-base: #3c3c3b;
$company-accent: #89c3ce;

$primary: #1976d2;
$secondary: #26a69a;
$accent: #9c27b0;

How can I access these in a script tag? For example...

const accentColor = $q.getColour('company-accent');

1 Answer 1

2

Given the docs, you can apparently you can access it this way

import { getCssVar } from 'quasar'

const accentColor = getCssVar('company-accent'); // #89c3ce

And write to it this way

import { setCssVar } from 'quasar'

setCssVar('company-accent', '#newColor');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.