Skip to content

Text background colour white #2112

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

Closed
CassStevenson opened this issue Jan 28, 2025 · 2 comments
Closed

Text background colour white #2112

CassStevenson opened this issue Jan 28, 2025 · 2 comments

Comments

@CassStevenson
Copy link

Suddenly noticed that text background is white when using jupyterbook/pydata-sphinx-theme with markdown files. I've noticed this when using grid-cards when the css for the card species a specific colour; cannot seem to resolve.

Previous build of same files where this does not occur (github pages/repo):
https://ab-rcsc.github.io/rc-decision-support-tool_concept-library/
https://github.com/AB-RCSC/rc-decision-support-tool_concept-library

New build of same files where this issue DOES occur (github pages/repo):
https://ab-rcsc.github.io/rc-decision-support-tool_concept-library_dev/
https://github.com/AB-RCSC/rc-decision-support-tool_concept-library_dev

@drammock
Copy link
Collaborator

drammock commented Jan 28, 2025

this change was introduced by #2058. The CSS selector for those elements is .bd-content .sd-card .sd-card-body, which was previously getting assigned a non-existent color variable for its background-color property, so it (accidentally) had no color at all. We consider it a bugfix that those nodes now have a proper background color.

It looks like you're setting card colors using solid .png images rather than CSS, so I guess the minimal fix for your case would be a new CSS rule that unsets the background-color property for those nodes, e.g. something like:

.bd-content .sd-card .sd-card-body {
    background-color: unset !important;
}

Closing, because I think the right fix here is in user CSS, not in the theme. Feel free to re-open if I've misunderstood something though, @CassStevenson

@CassStevenson
Copy link
Author

CassStevenson commented Jan 29, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@drammock @CassStevenson and others