how can apply vue.js scoped styles components loaded via <view-router>.
here code:
<template> <div id="admin"> <router-view></router-view> </div> </template> <style lang="scss" scoped> #admin { .actions { display: none; span { cursor: pointer; } } } </style> when visit /posts component named posts loaded, inside component have
<div class="actions"> content </div> the problem style defined in #admin not applied .action element. when not scoped, works fine. problem come when #admin component styling scoped.
is there way while keeping .actions style inside admin component scoped style tag?
you can put styles in separate file , reference components need it:
<style src="path/to/your/styles" lang="scss" scoped></style>
Comments
Post a Comment