Skip to content
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

Open
nadavsinai opened this issue Mar 1, 2018 · 7 comments
Open

feat: ::part support in Angular's Emulated CSS parser #22515

nadavsinai opened this issue Mar 1, 2018 · 7 comments
Labels
area: core Issues related to the framework runtime core: CSS encapsulation feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Milestone

Comments

@nadavsinai
Copy link

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
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.

@nadavsinai nadavsinai changed the title css ::part &::theme support in Angular's Emulated CSS parser css ::part & ::theme support in Angular's Emulated CSS parser Mar 1, 2018
@alexeagle alexeagle added the area: core Issues related to the framework runtime label Mar 1, 2018
@ngbot ngbot bot added this to the needsTriage milestone Mar 1, 2018
@mhevery mhevery added the feature Issue that requests a new feature label Mar 29, 2018
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Mar 29, 2018
@trotyl
Copy link
Contributor

trotyl commented May 31, 2018

Supersedes #7251?

@karptonite
Copy link
Contributor

Looks like ::theme has been removed from the draft standard, so at most, this should be supporting just ::part now. w3c/csswg-drafts@141fedf#diff-6c51ca844ad036fddb3fddd14d4f834f

The latest draft is here (at the moment): https://drafts.csswg.org/css-shadow-parts/

@lacolaco
Copy link
Contributor

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.

@perjerz
Copy link

perjerz commented Nov 20, 2020

image

https://caniuse.com

It's work all majors browsers now except IE 11.

@petebacondarwin petebacondarwin changed the title css ::part & ::theme support in Angular's Emulated CSS parser feat: ::part support in Angular's Emulated CSS parser Jan 23, 2021
@angular-robot angular-robot bot added the feature: under consideration Feature request for which voting has completed and the request is now under consideration label Jun 4, 2021
@vytautas-pranskunas-
Copy link

watching

@mangelozzi
Copy link

This is the problem with emulating the whole browser's CSS parser, one can never keep up with it.

@jyounce-aim
Copy link

jyounce-aim commented Dec 14, 2024

Any progress on adding support for ::part()?

This would be very useful. Along with eliminating the need for deprecated ::ng-deep, I think it would tremendously reduce the amount of component css variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to the framework runtime core: CSS encapsulation feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests