feat: `::part` support in Angular's Emulated CSS parser
- Lingua principale
- TypeScript
- Stelle
- 101k
- Fork
- 27.5k
- Merge medio
- 1g 19h
- PR unite (30g)
- 288
Descrizione
## I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[x ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
## Current behavior
Angular has no real replacement for the deprecated /deep/ (aka >>> and ::ng-deep) which are all marked as deprecated.
## Expected behavior
Angular should be at the forefront of web technology and provide today the technologies of tomorrow.
::part and ::theme provide a controlled and safe way to style components from outside without allowing abuse to the encapsulation that Shadow DOM is meant to provide.
[Explaining article](https://meowni.ca/posts/part-theme-explainer/)
[Spec Draft](https://tabatkins.github.io/specs/css-shadow-parts/#intro)
I would believe that such declared parts can be treated almost like @Input variables that trigger change detection. Although declared on the @Component style part they will be compiled into the .ngstyle and be incoparated in the view. when another component uses the ::part annotated component the styles are propagated.
## What is the motivation / use case for changing the behavior?
a component needs to allow external users to style its inner parts, let say a dropdown needs to have it's button, drop-down list & selection hover styleable.
Angular version: 5.2.6
Browser: Any, it should compile away to allow browsers to support it today.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando il parser CSS Emulated di Angular e l’elaborazione degli stili di @Component che produce l’output .ngstyle. Confronta il comportamento richiesto di ::part e ::theme con la specifica CSS Shadow Parts collegata e determina la semantica di propagazione necessaria. Il lavoro sarà considerato completato quando sarà disponibile una definizione concreta e testata di come le parti dichiarate vengono compilate e stilizzate dall’esterno di un componente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100