I want to customize the styling of Vue.js components loaded through <view-router>
using scoped styles.
This is the code I have:
<template>
<div id="admin">
<router-view></router-view>
</div>
</template>
<style lang="scss" scoped>
#admin {
.actions {
display: none;
span {
cursor: pointer;
}
}
}
</style>
When I navigate to the /posts
page, a component called Posts
is loaded. Inside this component, there is a
<div class="actions">
some content
</div>
The issue is that the styles defined in #admin
are not being applied to the .action
element when the styles are scoped. Everything works fine when the styles are not scoped. Is there a way to achieve this while still keeping the .actions
styling within the scoped style tag of the admin
component?