/deep/或:: ng-deep的长期替代解决方案是什么? [英] What is the long-term alternative solutions to /deep/ OR ::ng-deep?

查看:575
本文介绍了/deep/或:: ng-deep的长期替代解决方案是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

/deep/和:: ng-deep在DOM模式下也已弃用,我想知道将来是否会替代/deep/和:: ng-deep还是我们应该开始使用其他方式?

/deep/ and ::ng-deep these are also deprecated in DOM mode and, i'ld like to know whether there will be an alternative in the future to /deep/ and ::ng-deep or should we start using other ways?

::ng-deep .result-container .options-section .option-radio-button .option-text p {
         margin: 5px 0px !important;
         white-space: pre-wrap !important;
     }

推荐答案

当前没有其他选择,因此我们都应该继续使用它,因为它很实用.

Currently there's no alternative right now, so we should all continue to use it, because it's practical.

所有浏览器都正确支持ViewEncapsulation.Native并支持跨阴影DOM边界的样式时,::ng-deep可能会停止使用.

When ViewEncapsulation.Native is properly supported by all browsers and supports styling across shadow DOM boundaries, ::ng-deep will probably be discontinued.

这篇关于/deep/或:: ng-deep的长期替代解决方案是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆