Using * to set the style of all elements in scss scoped is partially valid

set style

<style lang="scss" scoped>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
</style>

found that it is only valid for some elements.

all valid after being changed to / deep/

.editor /deep/ {
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
}

Why is this?

Jun.16,2022

with the scoped attribute added, the style takes effect only for the current component.
ide/comparison.html-sharp%E7%BB%84%E4%BB%B6%E4%BD%9C%E7%94%A8%E5%9F%9F%E5%86%85%E7%9A%84-CSS" rel=" nofollow noreferrer "> vue scoped

Menu