If I add styles in one page they are applied on all [v0.15]
Alinex last edited by Alinex
I added a background image in my default
welcome.vuebut 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.
vinstah last edited by
you can use the scope attribute on <style> tag
leopiccionia last edited by
More details: https://vue-loader.vuejs.org/en/features/scoped-css.html
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.
Alinex last edited by
The scoped css works great, thanks.