No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    [Solved] Problem using some style variables

    Help
    2
    5
    1358
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      camilo last edited by camilo

      I’m trying to use stylus variables in my own styles, but apparently some variables are not working. On the example below, $grey is resolved but not $item-separator-color

      @import '~variables'
      
      .bg-static-info
        background-color $grey-2
      .border
        border 1px solid $item-separator-color
      

      0_1528994147210_78a46791-9209-4b19-bed5-aa633e1eec4e-image.png

      0_1528994004875_ea40fba5-43d8-44fa-b673-f2eb47875157-image.png

      1 Reply Last reply Reply Quote 0
      • nothingismagick
        nothingismagick last edited by

        @camilo - I don’t do SO much with stylus, but a quick look at the github repo showed that their use of border didn’t declare a color. Just a guess, but maybe you could try:

        .border
          border 1px solid 
          border-color $item-separator-color
        
        1 Reply Last reply Reply Quote 0
        • C
          camilo last edited by

          Still not working. I tried some of the variables found here https://quasar-framework.org/components/stylus-variables.html with mixed results. Some variables work fine while others doesn’t work.

          1 Reply Last reply Reply Quote 0
          • C
            camilo last edited by

            I added an issue here https://github.com/quasarframework/quasar/issues/2174

            1 Reply Last reply Reply Quote 0
            • C
              camilo last edited by

              This is the right way to use theme specific variables:

              @import '~variables'
              @import '~quasar-framework/src/css/variables.mat.styl'
              
              .bg-static-info
                background-color $grey-2
              .border
                border 1px solid $item-separator-color
              
              1 Reply Last reply Reply Quote 0
              • First post
                Last post