Files
gitea/web_src/css/modules/message.css
silverwind 58a1330078 Remove dead CSS (#37376)
Removes CSS rules that have zero usages across templates, Go source,
JS/TS/Vue, and `options/`. Each selector was cross-checked for runtime
additions (Fomantic JS, library classes) before removal.

A few rules with no current usages are kept as symmetric pairs of
heavily-used classes likely to be needed:
- `.ui.bottom.attached.header` / `.ui.bottom.attached.message` — pair
with the widely-used `top.attached` variants
- `.ui.warning.header` / `.ui.warning.segment` — warning-themed variants
of error-themed classes that are kept
- `.btn.small` — size variant alongside the kept `.btn.tiny`

---
This PR was written with the help of Claude Opus 4.7

---------

Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-04-24 09:45:16 +00:00

114 lines
2.3 KiB
CSS

/* based on Fomantic UI message module, with just the parts extracted that we use. If you find any
unused rules here after refactoring, please remove them. */
.ui.message {
background: var(--color-box-body);
color: var(--color-text);
border: 1px solid var(--color-secondary);
position: relative;
min-height: 1em;
margin: 1em 0;
padding: 1em 1.5em;
border-radius: var(--border-radius);
}
details.ui.message {
padding: 0;
}
details.ui.message summary {
padding: 1em 1.5em;
}
details.ui.message pre {
margin: -1.25em 0 0;
padding: 0.5em 1.5em;
white-space: pre-wrap;
}
details.ui.message:not(:has(pre)) summary {
list-style: none;
cursor: text;
}
.ui.message:first-child {
margin-top: 0;
}
.ui.message:last-child {
margin-bottom: 0;
}
.ui.attached.message {
margin-bottom: -1px;
border-radius: var(--border-radius) var(--border-radius) 0 0;
margin-left: -1px;
margin-right: -1px;
}
.ui.attached + .ui.attached.message:not(.top):not(.bottom) {
margin-top: -1px;
border-radius: 0;
}
.ui.bottom.attached.message {
margin-top: -1px;
border-radius: 0 0 var(--border-radius) var(--border-radius);
}
.ui.bottom.attached.message:not(:last-child) {
margin-bottom: 1em;
}
.ui.message .header {
color: inherit;
font-weight: var(--font-weight-semibold);
}
.ui.info.message,
.ui.attached.info.message,
.ui.blue.message,
.ui.attached.blue.message {
background: var(--color-info-bg);
color: var(--color-info-text);
border-color: var(--color-info-border);
}
.ui.success.message,
.ui.attached.success.message,
.ui.positive.message,
.ui.attached.positive.message {
background: var(--color-success-bg);
color: var(--color-success-text);
border-color: var(--color-success-border);
}
.ui.error.message,
.ui.attached.error.message,
.ui.red.message,
.ui.negative.message,
.ui.attached.negative.message {
background: var(--color-error-bg);
color: var(--color-error-text);
border-color: var(--color-error-border);
}
.ui.warning.message,
.ui.attached.warning.message {
background: var(--color-warning-bg);
color: var(--color-warning-text);
border-color: var(--color-warning-border);
}
.ui.message > .close.icon {
cursor: pointer;
position: absolute;
top: 9px;
right: 9px;
opacity: .7;
}
.ui.message > .close.icon:hover {
opacity: 1;
}