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

docs(theming): add docs about the tokens / CSS variables used for theming #26847

Closed
ChrTall opened this issue Mar 28, 2023 · 3 comments
Closed
Labels
area: theming docs This issue is related to documentation feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions

Comments

@ChrTall
Copy link

ChrTall commented Mar 28, 2023

Documentation Feedback

When following the guide theming-your-components I can succesfully create a partial scss file to theme my custom implementation of a Card component that should be styled like the Material Card.
For the background I access:
$background-palette: map-get($color-config, background); $background-color: mat.get-color-from-palette($background-palette, background); $background-card-color: mat.get-color-from-palette($background-palette, card);
So far when the user switches to a dark theme the background color changes like in material cards.
However the border of outlined material cards has a CSS Variable value for its color.
On light themes the value is #e0e0e0 for me. On Dark Themes it is #595959.
The Variable is: --mdc-outlined-card-outline-color
It would be nice if the docs could explain how I can apply these border color values to my component via the sass theming api / partial _my-comp.component-theme.scss file.

Affected documentation page

https://material.angular.io/guide/theming-your-components

@ChrTall ChrTall added docs This issue is related to documentation needs triage This issue needs to be triaged by the team labels Mar 28, 2023
@mmalerba mmalerba changed the title docs-bug(theming-your-components): Custom Mat Card border docs(theming): add docs about the tokens / CSS variables used for theming May 4, 2023
@mmalerba mmalerba added feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions area: theming and removed needs triage This issue needs to be triaged by the team labels May 4, 2023
@ctaepper
Copy link

we recently switched from legacy components to the mdc components and find it very hard to apply custom styles without any documentation about css variables.

From a documentation point of view, Ionicframework Docs do a good job in showing what can be customized

@amysorto
Copy link
Contributor

With the addition of #29363, the theming guide will be updated. As well as each component page will have documentation on how to override styles, here is a preview for menu: https://next.material.angular.io/components/menu/styling.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: theming docs This issue is related to documentation feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

4 participants