What's the substitute for ::shadow and /deep/?

后端 未结 4 1251
滥情空心
滥情空心 2020-12-05 17:49

The two shadow-piercing combinators have been deprecated as stated in https://www.chromestatus.com/features/6750456638341120
Then what\'s the substitude for achieving the

4条回答
  •  醉梦人生
    2020-12-05 18:31

    As of Polymer 2:

    • ::shadow (shadow-piercing selectors) - there is no direct substitute. Instead a custom CSS properties has to be used. Polymer 2: Custom CSS Properties

    • /deep/ - there is some sort of replacement by defining :host > * { ... } (applies a ruleset to all of the top-level children in the host's shadow tree, which doesn't conflict with the rule in the main document).

    For more detailed information check Polymer 2 Upgrade Notes

提交回复
热议问题