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

    Add custom css variables to color brands automatically

    Help
    2
    4
    459
    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.
    • L
      lazaroofarrill last edited by

      Is there any way of automatically adding css variables to brands. I’m trying to make a component and pass a custom gradient as a prop to component but the only way I got to do this was setting the brand manually in a boot file. Is there any way of adding new css variables defined in ‘quasar.variables.css’ automatically to brands to avoid this extra step?

      I 1 Reply Last reply Reply Quote 0
      • I
        Ilia @lazaroofarrill last edited by

        @lazaroofarrill Have a look at this section - you can call it anywhere in the code
        https://quasar.dev/style/color-palette#helper-setbrand

        1 Reply Last reply Reply Quote 0
        • L
          lazaroofarrill last edited by

          Yes I read the docs, but declaring in conf.js is still an extra step since i have to declare both the css variable and the brand separated.

          I 1 Reply Last reply Reply Quote 0
          • I
            Ilia @lazaroofarrill last edited by Ilia

            @lazaroofarrill That link is not for the config stage - that’s what you can use in your code dynamically 🙂

            1 Reply Last reply Reply Quote 0
            • First post
              Last post