angular-cn/packages/core/schematics/migrations/deep-shadow-piercing-selector
Alan Agius 7f6213a2f4 fix(migrations): add migration to replace `/deep/` with `::ng-deep` (#42214)
With this change we add a migration to replace the deprecated shadow-piercing selector from `/deep/` with deprecated but recommended `::ng-deep`.

The main motivation for this change is that the CSS optimizer CSSNano which is used by the Angular CLI no longer supports this non standard selector and causes build time errors due to the selector being minified incorrectly. However, CSSNano does support the recommended deprecated `::ng-deep` selector.

Closes: #42196

PR Close #42214
2021-05-21 22:13:29 +00:00
..
BUILD.bazel fix(migrations): add migration to replace `/deep/` with `::ng-deep` (#42214) 2021-05-21 22:13:29 +00:00
README.md fix(migrations): add migration to replace `/deep/` with `::ng-deep` (#42214) 2021-05-21 22:13:29 +00:00
index.ts fix(migrations): add migration to replace `/deep/` with `::ng-deep` (#42214) 2021-05-21 22:13:29 +00:00

README.md

shadow-piercing selector /deep/ to ::ng-deep

Automatically migrates shadow-piercing selector from /deep/ to ::ng-deep.

Before

:host /deep/ * {
  cursor: pointer;
}

After

:host ::ng-deep * {
  cursor: pointer;
}