RFC: 0023-scoped-styles-changes
    **
    单文件组件 <style scoped> 现在可以包含全局规则或只针对插槽内容的规则

    1. <style scoped>
    2. /* deep selectors */
    3. ::v-deep(.foo) {}
    4. /* shorthand */
    5. :deep(.foo) {}
    6. /* targeting slot content */
    7. ::v-slotted(.foo) {}
    8. /* shorthand */
    9. :slotted(.foo) {}
    10. /* one-off global rule */
    11. ::v-global(.foo) {}
    12. /* shorthand */
    13. :global(.foo) {}
    14. </style>
    • some CSS pre-processors such as SASS has issues parsing it since this is not an official CSS combinator


    • /deep/ 被提议成为css标准,但是没最终采用

    • ::v-deep 伪元素,CSS伪元素实际上在语义上不是组合符

    • :v-deep() 伪元素,可支持参数 :deep()