Make OBS SVG badges theme-aware using Gitea CSS variables #107
Reference in New Issue
Block a user
Delete Branch "schrodinger/autogits:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR updates the OBS status SVG badges generated by obs-status-service to use Gitea CSS theme variables instead of hardcoded colors.
By switching to variables like --color-success, --color-danger, --color-warning and --color-info, the badges now automatically adapt to both light and dark Gitea themes and better match the surrounding UI.
This improves readability and consistency of build status badges across different user themes, and aligns with the goal of improving build result visualization in the git-workflow.
Where did you get this javascript variable names? I can't find these in gitea css styles.
In any case, this is not working, the embed svg image doesn't have access to the css variables, for example this is what I get when I try to embed autogits package:
Thanks for the clarification.
I realize my mistake here since the SVG is embedded as an external image, it doesn’t have access to Gitea’s CSS variables, so using var(--color-*) won’t work as expected.
I’ll rework the approach
Pull request closed