Skip to content

Conversation

@Gouvernathor
Copy link

@Gouvernathor Gouvernathor commented Nov 29, 2025

Clarify usage of Angular's ::ng-deep pseudo class and its implications for global styles.

This is a documentation-only change, that explains how ::ng-deep actually works, explaining in effect what was mentioned in #25160.

I will also be proposing a change to the discouragement line - though I expect it will require more discussion since it explicitly engages "the Angular team" - to only discourage CSS rules where ::ng-deep appears at the start of the rule / applies to the whole selector.
In my view, it is perfectly useful and legitimate to want a component to have style authority on both its template and the children that it's provided with. It's even less drastic than the other ViewEncapsulation modes.

@pullapprove pullapprove bot requested a review from atscott November 29, 2025 14:43
Clarify usage of Angular's ::ng-deep pseudo class and its implications for global styles.
@angular-robot angular-robot bot added area: docs Related to the documentation area: common Issues related to APIs in the @angular/common package labels Nov 29, 2025
@ngbot ngbot bot added this to the Backlog milestone Nov 29, 2025
@angular angular deleted a comment from google-cla bot Nov 29, 2025
@github-actions
Copy link

Deployed adev-preview for 07cee82 to: https://ng-dev-previews-fw--pr-angular-angular-65718-adev-prev-14gyzu2s.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adev: preview area: common Issues related to APIs in the @angular/common package area: docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants