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

    Darkmode and SVG Image

    Help
    2
    2
    170
    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.
    • T
      TimE last edited by

      I have a SVG logo that is black on white, when I switch to dark mode, I would like the SVG to invert, which I can do in with filter: invert(100%) in css/sass. what I cant figure out, or find any examples is how in the sass file, to control which one get used in normal and dark mode, any pointers would be helpfull.

      Tim.

      1 Reply Last reply Reply Quote 0
      • T
        turigeza last edited by turigeza

        https://quasar.dev/quasar-plugins/dark#Dark-API
        You could assign a class to it with the above.

        Or better
        https://quasar.dev/style/dark-mode#How-to-style-your-app

        Body already have a class assigned. So just target it like

        .body--dark #myLogo {
            filter: invert(100%)
        }
        
        1 Reply Last reply Reply Quote 1
        • First post
          Last post