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

Add support for customising a card title color #36979

Merged
merged 5 commits into from Oct 31, 2022

Conversation

MitchellCash
Copy link
Contributor

Currently the card title will use the card body colour for its text. This pull requests lets you set a different card title colour compared to the body, which I find useful especially when using the new CSS variable --#{$prefix}card-title-color.

Personally I prefer this approach versus adding a utility class like text-primary as it allows for greater customisation via the SASS/CSS variables.

If this is useful I can also add a commit for the card subtitle?

@MitchellCash MitchellCash requested a review from a team as a code owner August 17, 2022 16:30
@twbs twbs deleted a comment from tungphan995 Sep 27, 2022
Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay @MitchellCash. We were working on the v5.2* until now :)

On my side, I find this request legitimate since we already have --bs-card-color and --bs-card-cap-color so let's go for more customization. In the same spirit, adding the same thing for card subtitle color might be useful as well.

@mdo Thoughts about this change? Any strong opinions against it?

scss/_card.scss Outdated Show resolved Hide resolved
scss/_variables.scss Outdated Show resolved Hide resolved
@MitchellCash
Copy link
Contributor Author

@julien-deramond before merge I will add the card subtitle colour as well (working on that now)

@MitchellCash
Copy link
Contributor Author

MitchellCash commented Oct 20, 2022

Ready for review/merge now 😃 Please let me know if you need me to squash any commits etc.

@julien-deramond
Copy link
Member

julien-deramond commented Oct 20, 2022

Ready for review/merge now 😃 Please let me know if you need me to squash any commits etc.

Thanks for that @MitchellCash. Just reviewed it, it is still OK for me. Don't worry about squashing the commits, we can do it while merging with the GitHub interface.
I let @mdo double-check if it is compliant with what we are trying to achieve with CSS vars in the future.

@mdo mdo merged commit cda4773 into twbs:main Oct 31, 2022
@MitchellCash MitchellCash deleted the card-title-color branch October 31, 2022 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants