Files
gitea/web_src/css/modules/modal.css
silverwind 89cd3737bc Migrate fomantic search and modal CSS to first-party modules (#36869)
Replace the fomantic search.css (520 lines) and modal.css (698 lines)
with minimal first-party modules containing only the rules actually
used. Hardcoded colors are replaced with theme variables, and the
base.css overrides are merged directly into the new modules.

With this change, all original Fomantic CSS is now gone.

**search.css**: 520 → 85 lines
**modal.css**: 698 → 329 lines

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-03-17 07:07:48 +01:00

331 lines
5.8 KiB
CSS

/* These are the remnants of the fomantic modal module */
.ui.modal {
position: absolute;
display: none;
z-index: var(--z-index-modal);
text-align: left;
background: var(--color-body);
border: none;
box-shadow: 1px 3px 3px 0 var(--color-shadow), 1px 3px 15px 2px var(--color-shadow);
transform-origin: 50% 25%;
flex: 0 0 auto;
border-radius: var(--border-radius);
user-select: text;
will-change: top, left, margin, transform, opacity;
}
.ui.modal > :first-child:not(.icon) {
border-top-left-radius: var(--border-radius);
border-top-right-radius: var(--border-radius);
}
.ui.modal > :last-child {
border-bottom-left-radius: var(--border-radius);
border-bottom-right-radius: var(--border-radius);
}
.ui.modal > .close {
cursor: pointer;
position: absolute;
top: -2.5rem;
right: -2.5rem;
z-index: 1;
opacity: 0.8;
font-size: 1.25em;
color: var(--color-white);
width: 2.25rem;
height: 2.25rem;
padding: 0.625rem 0 0;
}
.ui.modal > .close:hover {
opacity: 1;
}
.ui.modal > .header {
display: block;
font-family: var(--fonts-regular);
background: var(--color-body);
margin: 0;
padding: 1.25rem 1.5rem;
box-shadow: none;
color: var(--color-text-dark);
border-bottom: 1px solid var(--color-secondary);
border-top-left-radius: var(--border-radius);
border-top-right-radius: var(--border-radius);
}
.ui.modal > .header:not(.ui) {
font-size: 1.42857143rem;
line-height: 1.28571429em;
font-weight: var(--font-weight-medium);
}
.ui.modal > .header .svg {
vertical-align: middle;
display: inline-block;
}
.ui.modal > .content,
.ui.modal form > .content {
display: block;
width: 100%;
font-size: 1em;
line-height: 1.4;
padding: 1.5em;
background: var(--color-body);
border-radius: 0 0 var(--border-radius) var(--border-radius);
}
.ui.modal > .actions,
.ui.modal .content + .actions,
.ui.modal .content + form > .actions {
background: var(--color-secondary-bg);
padding: 1rem;
border-top: 1px solid var(--color-secondary);
text-align: right;
border-radius: 0 0 var(--border-radius) var(--border-radius);
}
.ui.modal .actions > .button {
margin-left: 0.75em;
}
@media only screen and (max-width: 767.98px) {
.ui.modal {
width: 95%;
}
}
@media only screen and (min-width: 768px) {
.ui.modal {
width: 88%;
}
}
@media only screen and (min-width: 992px) {
.ui.modal {
width: 850px;
}
}
@media only screen and (min-width: 1200px) {
.ui.modal {
width: 900px;
}
}
@media only screen and (min-width: 1920px) {
.ui.modal {
width: 950px;
}
}
@media only screen and (max-width: 991.98px) {
.ui.modal > .header {
padding-right: 2.25rem;
}
.ui.modal > .close {
top: 1.0535rem;
right: 1rem;
color: var(--color-text);
}
}
@media only screen and (max-width: 767.98px) {
.ui.modal > .header {
padding: 0.75rem 1rem !important;
padding-right: 2.25rem !important;
}
.ui.modal > .content {
display: block;
padding: 1rem !important;
}
.ui.modal > .close {
top: 0.5rem !important;
right: 0.5rem !important;
}
.ui.modal > .actions {
padding: 1rem 1rem 0 !important;
}
.ui.modal .actions > .buttons,
.ui.modal .actions > .button {
margin-bottom: 1rem;
}
}
.ui.active.modal {
display: block;
}
.scrolling.dimmable.dimmed {
overflow: hidden;
}
.scrolling.dimmable > .dimmer {
justify-content: flex-start;
position: fixed;
}
.scrolling.dimmable.dimmed > .dimmer {
overflow: auto;
}
.modals.dimmer .ui.scrolling.modal {
margin: 2rem auto;
}
.ui.modal > .close.inside + .header {
padding-right: 2.25rem;
}
.ui.modal > .close.inside {
top: 1.0535rem;
right: 1rem;
color: inherit;
}
.ui.modal > .close.icon[height="16"] {
top: 0.7em;
color: var(--color-text-dark);
}
.ui.mini.modal > .header:not(.ui) {
font-size: 1.3em;
}
@media only screen and (max-width: 767.98px) {
.ui.mini.modal {
width: 95%;
}
}
@media only screen and (min-width: 768px) {
.ui.mini.modal {
width: 35.2%;
}
}
@media only screen and (min-width: 992px) {
.ui.mini.modal {
width: 340px;
}
}
@media only screen and (min-width: 1200px) {
.ui.mini.modal {
width: 360px;
}
}
@media only screen and (min-width: 1920px) {
.ui.mini.modal {
width: 380px;
}
}
.ui.tiny.modal > .header:not(.ui) {
font-size: 1.3em;
}
@media only screen and (max-width: 767.98px) {
.ui.tiny.modal {
width: 95%;
}
}
@media only screen and (min-width: 768px) {
.ui.tiny.modal {
width: 52.8%;
}
}
@media only screen and (min-width: 992px) {
.ui.tiny.modal {
width: 510px;
}
}
@media only screen and (min-width: 1200px) {
.ui.tiny.modal {
width: 540px;
}
}
@media only screen and (min-width: 1920px) {
.ui.tiny.modal {
width: 570px;
}
}
.ui.small.modal > .header:not(.ui) {
font-size: 1.3em;
}
@media only screen and (max-width: 767.98px) {
.ui.small.modal {
width: 95%;
}
}
@media only screen and (min-width: 768px) {
.ui.small.modal {
width: 70.4%;
}
}
@media only screen and (min-width: 992px) {
.ui.small.modal {
width: 680px;
}
}
@media only screen and (min-width: 1200px) {
.ui.small.modal {
width: 720px;
}
}
@media only screen and (min-width: 1920px) {
.ui.small.modal {
width: 760px;
}
}
.ui.modal.g-modal-confirm {
max-width: min(800px, 90vw);
width: fit-content;
}
.ui.modal.g-modal-confirm > .inside.close.icon {
padding: 0;
width: 1em;
height: 1em;
top: 1.2em;
}
.ui.modal .content > form > .actions,
.ui.modal .content > .actions {
padding-top: 1em;
text-align: right;
}
.ui.modal .actions > .ui.button {
display: inline-flex;
align-items: center;
padding: 10px 12px 10px 10px;
margin-right: 0;
}
.ui.modal .actions > .ui.button.danger {
display: block;
width: 100%;
margin: 0 auto;
text-align: center;
}
.ui.modal .actions > .ui.button .svg {
margin-right: 5px;
}