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

    How can I change the theme color dynamically?

    Help
    5
    5
    3899
    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.
    • K
      keyb2004 last edited by

      Is there a way to change the theme color dynamically ?

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

        I’m sure that @rstoenescu can correct me if I’m wrong, but I believe that the theme cannot currently be altered dynamically as it is compiled as part of the build process.

        You can completely customise the default themes (see: http://quasar-framework.org/guide/quasar-theming.html) but I have not heard anything about doing so while the application is running.

        If this is a feature that you would like to see added, you can file an issue here: https://github.com/quasarframework/quasar/issues/new

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

          @keyb2004 Hi, as @matt correctly indicated, dynamic color change is not possible simply because the CSS needs to be “transpiled”, which cannot occur at runtime.

          1 Reply Last reply Reply Quote 1
          • LaurentPayot
            LaurentPayot last edited by LaurentPayot

            You can still modify some colors dynamically : http://stackoverflow.com/a/19844757/2675387

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

              You can Dynamically change the default Quasar theme with a special Stylus mixin.

              The creation of the mixin and the usage both explained towards the end of this thread:
              http://forum.quasar-framework.org/topic/1756/transform-scss-mixins-to-stylus

              It works great!

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