-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: clarify that ViewEncapsulation.Native is not supported #3386
Comments
This would be fantastic and well placed in the web component future. |
Can this be bumped up in priority? We have widgets that are being used by third parties and we are running into css bleeding into the components on certain sites. And we are having to deal with them individually. Would be fantastic and save us a lot of headaches if ViewEncapsulation.Native will be supported soon. |
Since this was lacking an official comment: We don't currently support |
should add to #7374 |
Code splitting does not work at all for Angular Material's CSS due to this issue, and the initial HTML response of an universal app become so huge when one include Angular Material into the app. Isn't it possible using some other strategy for theming? |
@kimamula see https://material.angular.io/guide/theming#theming-only-certain-components You can manually create a CSS file that includes only the styles you need for an SSR page. |
@jelbourn Thanks. |
You'd have to load the theme file at the same time as the component or else you'd see a flash of unstyled content |
Thanks, it seems working. I am sorry that this may be a little bit off topic, though. |
Also ViewEncapsulation.ShadowDom (v1 spec) kills Angular Material. Even if the Material css is global. It would be really nice to see some clear documentation about this. |
I agree that this should be documented in the Getting Started Guide or another commonly read location. Note that there is already an open issue tracking the need to document this for |
The recent rewrite to the theming guide for Angular v12 covers using the components with Shadow DOM: |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Feature request.
What is the expected behavior?
ViewEncapsulation.Native (shadow DOM) is supported.
What is the current behavior?
Not supported as of beta2.
What are the steps to reproduce?
https://plnkr.co/edit/cYf5hUx1GLXrMLSCg4ci?p=preview
Change the ViewEncapsulation between Native and Emulated.
Native (Shadow DOM) doesn't work with material beta2.
What is the use-case or motivation for changing an existing behavior?
Support shadow DOM.
Which versions of Angular, Material, OS, browsers are affected?
"@angular/common": "4.0.0-rc.1",
"@angular/compiler": "4.0.0-rc.1",
"@angular/core": "4.0.0-rc.1",
"@angular/flex-layout": "2.0.0-rc.1",
"@angular/forms": "4.0.0-rc.1",
"@angular/http": "4.0.0-rc.1",
"@angular/material": "2.0.0-beta.2",
Chrome on Win10.
Is there anything else we should know?
Nope.
The text was updated successfully, but these errors were encountered: