How to access SASS variables in script?

  • Hi folks,
    is it possible to access a variable defined in the style part of a Vue Component in its script.
    Let’s say I have:

    <style lang="sass">
    $one: #f80939

    Could I somehow do this (in the same file):

    export default {
      methods: {
        someMethod () {
          let color = this.$
          // do something with color 'one' here ...

    I know there is the css module option in vue:

    Is this the way to go?
    I’m not sure how I would configure this in Quasar with SASS and everything.

    Can anyone help?


Log in to reply