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

    If I add styles in one page they are applied on all [v0.15]

    Framework
    4
    5
    1396
    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.
    • A
      Alinex last edited by Alinex

      I added a background image in my default welcome.vue but now it is displayed on all pages. What should I do to limit the styles of one page to itself only?

      I found out that after changing the page the background will be kept, but if I then reload in the browser it will go away.

      1 Reply Last reply Reply Quote 0
      • V
        vinstah last edited by

        you can use the scope attribute on <style> tag

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

          More details: https://vue-loader.vuejs.org/en/features/scoped-css.html

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

            This is perfectly normal CSS behavior. When you visit a page, its CSS gets loaded (if it has one). Try to use CSS selectors to differentiate different areas of your website/app. Or use the scoped css feature provided by vue-loader on your vue files – but note that it comes with a small price regarding CSS render speed.

            1 Reply Last reply Reply Quote 0
            • A
              Alinex last edited by

              The scoped css works great, thanks.

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