Так вот код для моего компонента:
<template>
<div id="something" class="card">
</div>
</template>
const height = 200;
const width = 200;
let graph = d3
.select('#something')
.append('svg')
.attr('class', 'chart-container')
.attr('height', height)
.attr('width', width);
<style lang="scss" scoped>
.chart-container {
background-color: aquamarine;
}
</style>
У svg есть класс .chart-container
, к которому применен, но к
* не применяется стиль1008 *
Однако, когда я удаляю scoped
из <style lang="scss">
, это работает.
![The image of the inspection tool when the code working as intended](https://i.stack.imgur.com/Fwtqm.png)
Почему он так себя ведет?