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

    Setting $background-color in common.variables.styl has no effect

    Framework
    6
    8
    3800
    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.
    • J
      ju11 last edited by

      Hi,

      I try to change the background color of all webpages. I set $background-color but the page stays white. Is it a bug or did I miss something?
      Thanks

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        There’s no $background-color Stylus variable. Just use CSS to set the background of whatever element you want.

        1 Reply Last reply Reply Quote 0
        • M
          Max last edited by Max

          always check the list of available variables here: https://quasar-framework.org/components/stylus-variables.html . 🙂

          1 Reply Last reply Reply Quote 0
          • J
            ju11 last edited by

            Sorry, I made a mistake: the name of variable is $body-background, and I set it correctly.
            I noticed today that the background appears well on Chrome, but not on Firefox. Very strange! Could someone test it? Set $body-background in common.variables.styl and try it on Chrome and Firefox.

            1 Reply Last reply Reply Quote 0
            • P
              parag last edited by

              I am trying to use the body-background variable, but there is no effect. can you share more details on how to changes the default white background in light mode? I do not have an issue with dark more though.
              I am curious about the light mode, which variables control the background color and text color for the overall app

              metalsadman 1 Reply Last reply Reply Quote 0
              • metalsadman
                metalsadman @parag last edited by

                @parag https://quasar.dev/style/dark-mode#How-to-style-your-app

                1 Reply Last reply Reply Quote 0
                • P
                  parag last edited by

                  @metalsadman I am able to change the dark mode background using “–q-color-dark” variable.
                  In dark mode all components change to the color defined by the dark mode variable. whereas in light mode everything is #fff(white). If use the background: #000; then child components remain white.

                  What I am looking for is replacing everything in a single background color without playing with css classes for each child components, the default way in which light/dark mode operate.

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

                    Just override this:

                    body {
                        background-color: #fafafa
                    }
                    
                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post