components icon indicating copy to clipboard operation
components copied to clipboard

feat(theming): expose the sass function `theme-remove`

Open nzbin opened this issue 2 years ago • 5 comments

Feature Description

https://github.com/angular/components/blob/956b86fc98241e3ed17128513163eaedd2843479/src/material/_index.scss#L153-L154

expose the sass function theme-remove just like theme-has.

Use Case

I created a material extensions library https://github.com/ng-matero/extensions and I need the function theme-remove.

nzbin avatar Dec 17 '23 15:12 nzbin

Can you elaborate on what it would be used for?

crisbeto avatar Dec 18 '23 06:12 crisbeto

I implement the same mixin all-color and it uses the theme-remove. https://github.com/ng-matero/extensions/blob/main/projects/extensions/core/color/_all-color.scss

If it doesn't expose from the material index.scss, I would have to copy the whole file inspection.scss.

nzbin avatar Dec 18 '23 07:12 nzbin

Leaving it up to @mmalerba if we should expose this.

crisbeto avatar Dec 18 '23 07:12 crisbeto

Yeah I think it makes sense to expose this. I don't think I intended to make it internal, probably just forgot to add it to the forward list

mmalerba avatar Dec 20 '23 22:12 mmalerba

Here's a PR to expose it: https://github.com/angular/components/pull/28314

mmalerba avatar Dec 20 '23 22:12 mmalerba

Closing as fixed in #28314.

crisbeto avatar Jan 12 '24 16:01 crisbeto

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.