0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-03-15 12:06:57 +01:00
gitea/web_src/css/standalone/swagger.css
silverwind 6372cd7c7d
Enable native dark mode for swagger-ui (#36899)
Enable swagger-ui's dark mode support added in
https://github.com/swagger-api/swagger-ui/pull/10653. Background colors
match gitea, link colors match swagger-ui.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-03-14 09:50:23 +01:00

47 lines
658 B
CSS

*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
background: #fff;
}
.swagger-back-link {
color: #4990e2;
text-decoration: none;
position: absolute;
top: 1rem;
right: 1.5rem;
display: flex;
align-items: center;
}
@media (prefers-color-scheme: dark) {
body {
background: #1c2022;
}
.swagger-back-link {
color: #51a8ff;
}
.swagger-ui table.headers td {
color: #aeb4c4; /** fix low contrast */
}
}
.swagger-back-link:hover {
text-decoration: underline;
}
.swagger-back-link svg {
color: inherit;
fill: currentcolor;
margin-right: 0.5rem;
}
.swagger-spec-content {
display: none;
}