You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why isn't ViewEncapsulation automatically determined based on availability? #7394
What if you want None to be able to apply styles added to the <head> to the whole page? Or if you want style descentant elements from a component while maintaining encapsulation from outside the component.
@zoechi I never meant to disable the option completely. Obviously, there needs to be a way to control style encapsulation.
My question is why isn't there an additional (and possibly the default) option that is ViewEncapsulation.Auto that will automatically detect whether native ShadowDOM can be used.
The currently default value (Emulated) is making sure that native ShadowDOM cannot be leveraged even when it does supported.
Ok, than it's good you created the issue. I hope my questions helped make it more clear for future visitors what the issue is about instead of obscuring it ;-)
Activity
zoechi commentedon Mar 3, 2016
What if you want
Noneto be able to apply styles added to the<head>to the whole page? Or if you want style descentant elements from a component while maintaining encapsulation from outside the component.chaim770 commentedon Mar 3, 2016
@zoechi I never meant to disable the option completely. Obviously, there needs to be a way to control style encapsulation.
My question is why isn't there an additional (and possibly the default) option that is
ViewEncapsulation.Autothat will automatically detect whether native ShadowDOM can be used.The currently default value (
Emulated) is making sure that native ShadowDOM cannot be leveraged even when it does supported.zoechi commentedon Mar 3, 2016
I see. I expected
Nativeto fall back toEmulatedif not available.chaim770 commentedon Mar 3, 2016
@zoechi, I doubt that's the case. Also, the documentation doesn't state so (where it really should).
See:
angular/modules/angular2/src/platform/dom/dom_renderer.ts
Line 109 in e7470d5
zoechi commentedon Mar 3, 2016
Ok, than it's good you created the issue. I hope my questions helped make it more clear for future visitors what the issue is about instead of obscuring it ;-)
TheLarkInn commentedon Mar 9, 2016
+1
zoechi commentedon Jul 8, 2016
This should now be easier after #7883 has landed.
vicb commentedon Jul 8, 2016
it's not possible because the behavior are not exactly the same (there are edge cases)
angular-automatic-lock-bot commentedon Sep 9, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.