You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: card-title sets its own (incorrect) text color #134
The image overlay example, in e.g. theme Spotify, has a not-so-easy-to-read white text (forced with text-white class).
One may think we can just remove text-white and it works, but not for the title as .card-title has the rule: color: var(--color-base-content);.
According to doc, the card-titleh2 is a descendent of the card-bodydiv, which has the (correct) text color set on it. As a result, it would be more convenient (more correct?) for card-title to simply inherit the text color from its card-body ancestor.
Thank you for your support in helping us improve FlyonUI!
We’ve received your submission and will respond within few business days. Our team handles issues one at a time, and we’ll be reviewing yours as soon as possible.
In the meantime, any additional details or a reproducible example would be greatly appreciated and will help us resolve the issue more efficiently.
changed the title [-]bug: `card-title` sets its own (incorrect) text `color[/-][+]bug: `card-title` sets its own (incorrect) text `color`[/+]on Dec 19, 2025
<divclass="card sm:max-w-sm"><divclass="card-header"><h5class="card-title">Exclusive Feature Highlight</h5></div><divclass="card-body"><p>
Discover the unique benefits and features we offer. Dive deeper to learn how our solutions can enhance your experience and meet your needs effectively.
</p></div></div>
With this layout, the card-header can not inherit the text color from the card-body. The card-body uses the secondary body color (text-base-content/80), which is intended for regular content text, while the card-title uses the default heading color (text-base-content).
If needed, you can always override the text color of the card-title explicitly.
I hope this clarifies things and answers your question.
This example is irrelevant though. And my point is not about being able to override the text color either, it is about avoiding having to.
The specific paragraph I have copied and linked from the flyonui website was "Image overlay" (https://flyonui.com/docs/components/card/#image-overlays). Be sure to check the repro link I provided is a perfect copy/paste of the code from your site + what happens when removing the forced text color.
There is no div.card-header in that snippet; neither is there, BTW, in:
the first "Basic" example (Default) at the very top of the page
So, yes, you sure can find a few cases that follow the structure you are giving me, but that is in fact the minority of what I find of the page.
Among these, image overlay comes different because the image gets a light filter on it, requiring the text color to be set to --color-neutral-content (blackish), whereas other cases are on the regular dark background, hence --color-base-content (whitish) is suitable.
For reference, taking that basic structure you are giving me and turning it into an "image overlay" card results in a complete mess of a card (the body is pull up to cover the header)
To reconcile the 2 points, I would recommend to leave the text color to the following rule:
Alternatively, the text color could perhaps be left to the parent div.card-header instead of the inner div.card-title, but like I pointed out, many of the provided snippets do not come with one, so the color of the entire card would be inherited from the .card parent.
Going this way, cases that do not have a div.card-header will have to settle for inheriting text-base-content/80.
Thank you for the detailed investigation and for suggesting a very helpful solution.
Yes, card-title can be used inside both' card-header' and' card-body', but it should not inherit its color from either.
The title is treated as a heading element, and its color is defined intentionally to maintain a clear visual distinction from regular body text, regardless of where it is placed within the card.
Given our current implementation of image-full, we agree that the best improvement is not to remove the explicit color from .card-title, but to define the correct semantic colors for image overlays directly in the component CSS.
Hi @PruthviPraj00, I'd like to work on this and open a PR.
My understanding of the root cause: in image-full, the overlay uses bg-neutral, but .card-title always uses base-content. In themes like Spotify both end up light, so the title is hard to read.
Plan
In .card.image-full, set the body text to neutral-content/80 and the title to neutral-content, as you proposed.
Use a descendant selector for .card-title (not only > .card-body > .card-title) so it also works when the title is in a card-header or in snippets without one.
Remove text-white from the Image Overlay example in the docs.
Test with both light-overlay and dark themes.
Parent color
If we set the text color on the image-full parent, the text inside it will pick up the correct color for the overlay automatically, so users won't need to add manual color utilities like text-white. The .card-title rule inside image-full makes sure the heading follows the same color pairing.
I'll open the PR shortly. Please let me know if you'd prefer a different approach.
Thank you for your interest in contributing to FlyonUI! We really appreciate your enthusiasm and willingness to help improve Flyonui. 🚀
You're more than welcome to go ahead and create a PR with your proposed solution! Our team will be happy to review it and merge it once everything looks good. If any adjustments or improvements are needed, we'll share our feedback and help guide you through the process.
Note: Since you won't be able to update the documentation directly, please include any proposed documentation changes in the PR description on GitHub so we can take care of them.
Thanks again for contributing to FlyonUI! We're excited to see your work. 🙌
Activity
github-actions commentedon Dec 19, 2025
Thank you for your support in helping us improve FlyonUI!
We’ve received your submission and will respond within few business days. Our team handles issues one at a time, and we’ll be reviewing yours as soon as possible.
In the meantime, any additional details or a reproducible example would be greatly appreciated and will help us resolve the issue more efficiently.
Thank you for your patience and understanding!
[-]bug: `card-title` sets its own (incorrect) text `color[/-][+]bug: `card-title` sets its own (incorrect) text `color`[/+]PruthviPraj00 commentedon Dec 22, 2025
Hello @AtmoFX,
Below is the basic structure of the card:
With this layout, the card-header can not inherit the text color from the card-body. The card-body uses the secondary body color (text-base-content/80), which is intended for regular content text, while the card-title uses the default heading color (text-base-content).
If needed, you can always override the text color of the card-title explicitly.
I hope this clarifies things and answers your question.
AtmoFX commentedon Dec 22, 2025
This example is irrelevant though. And my point is not about being able to override the text color either, it is about avoiding having to.
The specific paragraph I have copied and linked from the flyonui website was "Image overlay" (https://flyonui.com/docs/components/card/#image-overlays). Be sure to check the repro link I provided is a perfect copy/paste of the code from your site + what happens when removing the forced text color.
There is no
div.card-headerin that snippet; neither is there, BTW, in:So, yes, you sure can find a few cases that follow the structure you are giving me, but that is in fact the minority of what I find of the page.
Among these, image overlay comes different because the image gets a light filter on it, requiring the text color to be set to
--color-neutral-content(blackish), whereas other cases are on the regular dark background, hence--color-base-content(whitish) is suitable.For reference, taking that basic structure you are giving me and turning it into an "image overlay" card results in a complete mess of a card (the body is pull up to cover the header)
To reconcile the 2 points, I would recommend to leave the text color to the following rule:
Which means, the rule that is causing me issues (below) should have a
:not(.image-full)somewhere, so that it does not conflict.Alternatively, the text color could perhaps be left to the parent
div.card-headerinstead of the innerdiv.card-title, but like I pointed out, many of the provided snippets do not come with one, so the color of the entire card would be inherited from the.cardparent.Going this way, cases that do not have a
div.card-headerwill have to settle for inheritingtext-base-content/80.PruthviPraj00 commentedon Dec 25, 2025
Thank you for the detailed investigation and for suggesting a very helpful solution.
Yes,
card-titlecan be used inside both' card-header' and' card-body', but it should not inherit its color from either.The title is treated as a heading element, and its color is defined intentionally to maintain a clear visual distinction from regular body text, regardless of where it is placed within the card.
Given our current implementation of
image-full, we agree that the best improvement is not to remove the explicit color from.card-title, but to define the correct semantic colors for image overlays directly in the component CSS.Currently,
image-fullsets:This applies the same color to both body text, but it does not update the
card-title.To improve this, we’ll update the
image-fullstyles so that:text-neutral-content/80text-neutral-contentThis keeps:
text-white)Proposed update:
We’ll also update the Image Overlay example in the docs to reflect this behavior, so users don’t need to add manual color utilities.
If you’d like to open a PR with this change, we’d be happy to review it. Contributions are always welcome ❤️
SilentCoder-HI commentedon Nov 2, 2026
Hi @PruthviPraj00, I'd like to work on this and open a PR.
My understanding of the root cause: in
image-full, the overlay usesbg-neutral, but.card-titlealways usesbase-content. In themes like Spotify both end up light, so the title is hard to read.Plan
.card.image-full, set the body text toneutral-content/80and the title toneutral-content, as you proposed..card-title(not only> .card-body > .card-title) so it also works when the title is in acard-headeror in snippets without one.text-whitefrom the Image Overlay example in the docs.Parent color
If we set the text color on the
image-fullparent, the text inside it will pick up the correct color for the overlay automatically, so users won't need to add manual color utilities liketext-white. The.card-titlerule insideimage-fullmakes sure the heading follows the same color pairing.I'll open the PR shortly. Please let me know if you'd prefer a different approach.
PruthviPraj00 commentedon Nov 6, 2026
Hello @SilentCoder-HI,
Thank you for your interest in contributing to FlyonUI! We really appreciate your enthusiasm and willingness to help improve Flyonui. 🚀
You're more than welcome to go ahead and create a PR with your proposed solution! Our team will be happy to review it and merge it once everything looks good. If any adjustments or improvements are needed, we'll share our feedback and help guide you through the process.
Note: Since you won't be able to update the documentation directly, please include any proposed documentation changes in the PR description on GitHub so we can take care of them.
Thanks again for contributing to FlyonUI! We're excited to see your work. 🙌