mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(core): improve viewEncapsulation documentation (#44151)
Slighlty improve the `viewEncapsulation` documentation (both in code comments and content files) to make it more clear and understandable. See https://github.com/angular/angular/pull/44099#discussion_r745890903 PR Close #44151
This commit is contained in:
committed by
Jessica Janiuk
parent
2bf131a8a0
commit
6ae38584b0
@@ -177,7 +177,7 @@ export interface R3DeclareComponentMetadata extends R3DeclareDirectiveMetadata {
|
||||
changeDetection?: ChangeDetectionStrategy;
|
||||
|
||||
/**
|
||||
* An encapsulation policy for the template and CSS styles.
|
||||
* An encapsulation policy for the component's styling.
|
||||
* Defaults to `ViewEncapsulation.Emulated`.
|
||||
*/
|
||||
encapsulation?: ViewEncapsulation;
|
||||
|
||||
@@ -206,11 +206,12 @@ export interface R3ComponentMetadata extends R3DirectiveMetadata {
|
||||
styles: string[];
|
||||
|
||||
/**
|
||||
* An encapsulation policy for the template and CSS styles. One of:
|
||||
* - `ViewEncapsulation.Emulated`: Use shimmed CSS that emulates the native behavior.
|
||||
* - `ViewEncapsulation.None`: Use global CSS without any encapsulation.
|
||||
* - `ViewEncapsulation.ShadowDom`: Use the latest ShadowDOM API to natively encapsulate styles
|
||||
* into a shadow root.
|
||||
* An encapsulation policy for the component's styling.
|
||||
* Possible values:
|
||||
* - `ViewEncapsulation.Emulated`: Apply modified component styles in order to emulate
|
||||
* a native Shadow DOM CSS encapsulation behavior.
|
||||
* - `ViewEncapsulation.None`: Apply component styles globally without any sort of encapsulation.
|
||||
* - `ViewEncapsulation.ShadowDom`: Use the browser's native Shadow DOM API to encapsulate styles.
|
||||
*/
|
||||
encapsulation: ViewEncapsulation;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user