-
Notifications
You must be signed in to change notification settings - Fork 25.7k
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
feat: ::part
support in Angular's Emulated CSS parser
#22515
Comments
Supersedes #7251? |
Looks like The latest draft is here (at the moment): https://drafts.csswg.org/css-shadow-parts/ |
Shadow Part has been shipped by Safari Technical Preview 94 so it is implemented by most major browsers except Edge/IE natively. Today it is enough standard to adopt by Angular's emulated encapsulation. |
It's work all majors browsers now except IE 11. |
::part
support in Angular's Emulated CSS parser
watching |
This is the problem with emulating the whole browser's CSS parser, one can never keep up with it. |
I'm submitting a...
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
Spec Draft
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.
The text was updated successfully, but these errors were encountered: