A prompt quoted on one line in a Civitai description made the whole details column scroll sideways. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
565 lines
14 KiB
CSS
565 lines
14 KiB
CSS
/* The model editor (ui_model_editor.js: cover and its choices on the left, name, source link
|
|
and notes on the right, Reset, Cancel and Save at the foot), and in the model details
|
|
(model_source.js) the note on what was read from the file; the details' head after it. */
|
|
|
|
.anomalous-medit-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 10001;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 24px;
|
|
box-sizing: border-box;
|
|
background: var(--amb-scrim);
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
|
|
.anomalous-medit {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: min(800px, 100%);
|
|
max-height: 100%;
|
|
border: 1px solid var(--amb-border-strong);
|
|
border-radius: 14px;
|
|
background: var(--amb-bg-panel);
|
|
box-shadow: 0 24px 64px rgba(var(--amb-shadow-rgb), 0.45);
|
|
color: var(--amb-text-main);
|
|
font-size: 14px;
|
|
overflow: hidden;
|
|
container: medit / inline-size;
|
|
}
|
|
|
|
.anomalous-medit-head {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
padding: 18px 18px 14px 24px;
|
|
border-bottom: 1px solid var(--amb-border);
|
|
}
|
|
|
|
.anomalous-medit-titles {
|
|
display: flex;
|
|
flex: 1;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 4px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.anomalous-medit-titles h3 {
|
|
margin: 0;
|
|
font-size: 17px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.anomalous-medit-file {
|
|
margin: 0;
|
|
color: var(--amb-text-muted);
|
|
font: 12px/1.4 ui-monospace, Consolas, monospace;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
/* Where the information came from, as a small chip: dashed when read from the file. */
|
|
.anomalous-medit-origin {
|
|
margin: 2px 0 0;
|
|
padding: 2px 9px;
|
|
border: 1px solid var(--amb-border-strong);
|
|
border-radius: 999px;
|
|
color: var(--amb-text-soft);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.anomalous-medit-origin.is-civitai {
|
|
border-color: color-mix(in srgb, var(--amb-ok-text) 40%, transparent);
|
|
color: var(--amb-ok-text);
|
|
}
|
|
|
|
.anomalous-medit-origin.is-local {
|
|
border-style: dashed;
|
|
border-color: color-mix(in srgb, var(--amb-link) 50%, transparent);
|
|
background: color-mix(in srgb, var(--amb-link) 7%, transparent);
|
|
}
|
|
|
|
.anomalous-medit-close {
|
|
flex-shrink: 0;
|
|
width: 32px;
|
|
height: 32px;
|
|
padding: 0;
|
|
border: none;
|
|
border-radius: 8px;
|
|
background: transparent;
|
|
color: var(--amb-text-muted);
|
|
font-size: 22px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-medit-close:hover {
|
|
background: rgba(var(--amb-ink-rgb), 0.08);
|
|
color: var(--amb-text-main);
|
|
}
|
|
|
|
.anomalous-medit-body {
|
|
display: flex;
|
|
gap: 26px;
|
|
min-height: 0;
|
|
padding: 20px 24px 22px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
/* The cover: large, the choices under it (the current one, Civitai's, recent pictures, upload, gallery). */
|
|
.anomalous-medit-cover-side {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-shrink: 0;
|
|
gap: 8px;
|
|
width: 236px;
|
|
}
|
|
|
|
.anomalous-medit-cover {
|
|
display: grid;
|
|
place-items: center;
|
|
aspect-ratio: 3 / 4;
|
|
border: 1px solid var(--amb-border);
|
|
border-radius: 12px;
|
|
background: rgba(var(--amb-ink-rgb), 0.04);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.anomalous-medit-cover > img,
|
|
.anomalous-medit-cover > video {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.anomalous-medit-cover-empty {
|
|
color: var(--amb-text-dim);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.anomalous-medit-choices {
|
|
display: grid;
|
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
gap: 6px;
|
|
}
|
|
|
|
.anomalous-medit-choice {
|
|
display: grid;
|
|
place-items: center;
|
|
aspect-ratio: 1;
|
|
padding: 0;
|
|
border: 1px solid var(--amb-border);
|
|
border-radius: 8px;
|
|
background: rgba(var(--amb-ink-rgb), 0.05);
|
|
color: var(--amb-text-muted);
|
|
font: inherit;
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-medit-choice > img {
|
|
display: block;
|
|
grid-area: 1 / 1;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.anomalous-medit-choice-mark {
|
|
grid-area: 1 / 1;
|
|
font-size: 16px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.anomalous-medit-choice:hover { border-color: var(--amb-border-hover); }
|
|
|
|
.anomalous-medit-choice.is-selected {
|
|
border-color: transparent;
|
|
outline: 2px solid var(--amb-link);
|
|
outline-offset: 1px;
|
|
}
|
|
|
|
/* Upload and the whole gallery: actions, not pictures. */
|
|
.anomalous-medit-choice.is-action {
|
|
border-style: dashed;
|
|
border-color: var(--amb-border-strong);
|
|
background: transparent;
|
|
}
|
|
|
|
.anomalous-medit-choice.is-action:hover {
|
|
border-color: color-mix(in srgb, var(--amb-link) 55%, transparent);
|
|
color: var(--amb-text-main);
|
|
}
|
|
|
|
.anomalous-medit-fields {
|
|
display: flex;
|
|
flex: 1;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.anomalous-medit-field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 7px;
|
|
}
|
|
|
|
.anomalous-medit-label {
|
|
color: var(--amb-text-soft);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.anomalous-medit-input {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding: 9px 12px;
|
|
border: 1px solid var(--amb-border-strong);
|
|
border-radius: 8px;
|
|
background: var(--amb-bg-input);
|
|
color: var(--amb-text-main);
|
|
font: inherit;
|
|
font-size: 14px;
|
|
outline: none;
|
|
transition: border-color 0.15s, box-shadow 0.15s;
|
|
}
|
|
|
|
.anomalous-medit-input::placeholder { color: var(--amb-text-dim); }
|
|
|
|
.anomalous-medit-input:focus {
|
|
border-color: color-mix(in srgb, var(--amb-link) 70%, transparent);
|
|
box-shadow: 0 0 0 3px color-mix(in srgb, var(--amb-link) 18%, transparent);
|
|
}
|
|
|
|
.anomalous-medit-notes {
|
|
min-height: 132px;
|
|
line-height: 1.6;
|
|
resize: vertical;
|
|
}
|
|
|
|
/* The link, with the site it points to named at its end. */
|
|
.anomalous-medit-link {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.anomalous-medit-link > .anomalous-medit-input { padding-right: 104px; }
|
|
|
|
.anomalous-medit-site {
|
|
position: absolute;
|
|
right: 8px;
|
|
padding: 2px 9px;
|
|
border: 1px solid var(--amb-border-strong);
|
|
border-radius: 999px;
|
|
background: var(--amb-bg-input);
|
|
font-size: 11.5px;
|
|
font-weight: 600;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.anomalous-medit-site[hidden] { display: none; }
|
|
|
|
.anomalous-medit-hint {
|
|
color: var(--amb-text-muted);
|
|
font-size: 12px;
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.anomalous-medit-hint:empty { display: none; }
|
|
|
|
.anomalous-medit-check {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
width: fit-content;
|
|
color: var(--amb-text-soft);
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-medit-check > input {
|
|
margin: 0;
|
|
accent-color: var(--amb-link);
|
|
}
|
|
|
|
.anomalous-medit-check.is-disabled {
|
|
opacity: 0.55;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.anomalous-medit-foot {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 14px 24px;
|
|
border-top: 1px solid var(--amb-border);
|
|
background: rgba(var(--amb-ink-rgb), 0.02);
|
|
}
|
|
|
|
.anomalous-medit-reset {
|
|
padding: 7px 2px;
|
|
border: none;
|
|
background: none;
|
|
color: var(--amb-text-muted);
|
|
font: inherit;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-medit-reset:hover:not(:disabled) {
|
|
color: var(--amb-danger-text);
|
|
text-decoration: underline dotted;
|
|
text-underline-offset: 3px;
|
|
}
|
|
|
|
.anomalous-medit-error {
|
|
flex: 1;
|
|
min-width: 0;
|
|
color: var(--amb-danger-text);
|
|
font-size: 12.5px;
|
|
text-align: right;
|
|
}
|
|
|
|
.anomalous-medit-cancel {
|
|
padding: 8px 16px;
|
|
border: 1px solid var(--amb-border-strong);
|
|
border-radius: 8px;
|
|
background: transparent;
|
|
color: var(--amb-text-soft);
|
|
font: inherit;
|
|
font-size: 13.5px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-medit-cancel:hover:not(:disabled) {
|
|
background: rgba(var(--amb-ink-rgb), 0.06);
|
|
color: var(--amb-text-main);
|
|
}
|
|
|
|
.anomalous-medit-save { min-width: 92px; }
|
|
|
|
.anomalous-medit button:disabled { cursor: progress; opacity: 0.6; }
|
|
|
|
/* Narrow (docked, a small window): the cover small on the left of its choices, above the fields. */
|
|
@container medit (max-width: 620px) {
|
|
.anomalous-medit-body { flex-direction: column; gap: 20px; padding: 16px 18px 18px; }
|
|
.anomalous-medit-cover-side {
|
|
display: grid;
|
|
grid-template-columns: 96px minmax(0, 1fr);
|
|
grid-template-rows: auto auto 1fr;
|
|
gap: 6px 14px;
|
|
width: auto;
|
|
}
|
|
.anomalous-medit-cover { grid-row: 1 / 4; }
|
|
.anomalous-medit-choices { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
|
|
.anomalous-medit-head { padding: 14px 14px 12px 18px; }
|
|
.anomalous-medit-foot { flex-wrap: wrap; padding: 12px 18px; }
|
|
}
|
|
|
|
/* The top of a model's details (model_detail_head.js): the crumb back, the name with its
|
|
facts and source links, and the action row; Add node is the one accent-coloured button. */
|
|
.anomalous-detail-head {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-shrink: 0;
|
|
gap: 10px;
|
|
margin-bottom: 12px;
|
|
padding-bottom: 14px;
|
|
border-bottom: 1px solid var(--amb-border-strong);
|
|
}
|
|
|
|
.anomalous-detail-back {
|
|
align-self: flex-start;
|
|
margin-left: -6px;
|
|
padding: 2px 6px;
|
|
border: 0;
|
|
border-radius: 6px;
|
|
background: transparent;
|
|
color: var(--amb-text-muted);
|
|
font: inherit;
|
|
font-size: 12.5px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-detail-back:hover { background: rgba(var(--amb-ink-rgb), 0.08); color: var(--amb-text-main); }
|
|
.anomalous-detail-back.is-leaving { color: var(--amb-link); font-weight: 600; }
|
|
|
|
.anomalous-detail-named {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* Only where the cover column is hidden (ui_detail.js and 01-shell-tools.css: under 750 px). */
|
|
.anomalous-detail-head-cover {
|
|
display: none;
|
|
flex: none;
|
|
width: 64px;
|
|
height: 64px;
|
|
border-radius: 8px;
|
|
object-fit: cover;
|
|
background: var(--amb-bg-page);
|
|
}
|
|
|
|
@container (max-width: 750px) {
|
|
.anomalous-detail-head-cover { display: block; }
|
|
}
|
|
|
|
.anomalous-detail-title {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.anomalous-detail-name {
|
|
margin: 0;
|
|
color: var(--amb-text-main);
|
|
font-size: 1.45em;
|
|
line-height: 1.25;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.anomalous-detail-facts {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 6px 10px;
|
|
color: var(--amb-text-muted);
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.anomalous-detail-links {
|
|
display: inline-flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
}
|
|
|
|
.anomalous-detail-link {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 2px 8px;
|
|
border: 1px solid var(--amb-border-strong);
|
|
border-radius: 6px;
|
|
background: rgba(var(--amb-ink-rgb), 0.06);
|
|
color: var(--amb-text-main);
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.anomalous-detail-link:hover { background: rgba(var(--amb-ink-rgb), 0.12); }
|
|
|
|
.anomalous-detail-link-dot {
|
|
width: 7px;
|
|
height: 7px;
|
|
border-radius: 50%;
|
|
background: var(--amb-text-muted);
|
|
}
|
|
|
|
.anomalous-detail-actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.anomalous-detail-action {
|
|
padding: 7px 14px;
|
|
border: 1px solid var(--amb-border-strong);
|
|
border-radius: 8px;
|
|
background: rgba(var(--amb-ink-rgb), 0.06);
|
|
color: var(--amb-text-main);
|
|
font: inherit;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-detail-action:hover { background: rgba(var(--amb-ink-rgb), 0.12); }
|
|
|
|
/* The page's colour as text: dark on the light accents of the dark themes, light on the light theme's. */
|
|
.anomalous-detail-action.is-primary {
|
|
padding-inline: 22px;
|
|
border-color: transparent;
|
|
background: var(--amb-link);
|
|
color: var(--amb-bg-page);
|
|
}
|
|
|
|
/* A model's description is Civitai's HTML; its headings stay a little above the text, not poster size. */
|
|
.anomalous-detail-description :is(h1, h2) { margin: 0.8em 0 0.4em; font-size: 1.15em; line-height: 1.35; }
|
|
.anomalous-detail-description :is(h3, h4, h5, h6) { margin: 0.7em 0 0.3em; font-size: 1.05em; line-height: 1.35; }
|
|
.anomalous-detail-description > :first-child { margin-top: 0; }
|
|
/* Its code blocks are often a whole prompt on one line: they wrap rather than widen the details. */
|
|
.anomalous-detail-description :is(pre, pre code) { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
|
|
.anomalous-detail-action.is-primary:hover { background: color-mix(in srgb, var(--amb-link) 85%, var(--amb-text-main)); }
|
|
|
|
/* A model Civitai does not know: what was read from the file, and a way to add the rest. */
|
|
.anomalous-inferred-note {
|
|
display: flex;
|
|
flex-shrink: 0;
|
|
flex-wrap: wrap;
|
|
align-items: flex-start;
|
|
gap: 10px 12px;
|
|
margin-bottom: 12px;
|
|
padding: 12px 14px;
|
|
border: 1px dashed color-mix(in srgb, var(--amb-link) 45%, var(--amb-border));
|
|
border-radius: 10px;
|
|
background: color-mix(in srgb, var(--amb-link) 6%, transparent);
|
|
}
|
|
|
|
.anomalous-inferred-mark {
|
|
width: 20px;
|
|
color: var(--amb-link);
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
line-height: 1.2;
|
|
text-align: center;
|
|
}
|
|
|
|
.anomalous-inferred-text {
|
|
display: flex;
|
|
flex: 1 1 260px;
|
|
flex-direction: column;
|
|
gap: 3px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.anomalous-inferred-text > strong { font-size: 13.5px; }
|
|
|
|
.anomalous-inferred-text > span {
|
|
color: var(--amb-text-muted);
|
|
font-size: 12.5px;
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.anomalous-inferred-edit {
|
|
align-self: center;
|
|
padding: 6px 12px;
|
|
border: 1px solid color-mix(in srgb, var(--amb-link) 45%, transparent);
|
|
border-radius: 7px;
|
|
background: transparent;
|
|
color: var(--amb-text-main);
|
|
font: inherit;
|
|
font-size: 12.5px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.anomalous-inferred-edit:hover { background: color-mix(in srgb, var(--amb-link) 14%, transparent); }
|
|
|
|
.anomalous-inferred-note.is-damaged {
|
|
border-color: color-mix(in srgb, var(--amb-danger-text) 45%, transparent);
|
|
background: color-mix(in srgb, var(--amb-danger-text) 7%, transparent);
|
|
}
|
|
|
|
.anomalous-inferred-note.is-damaged .anomalous-inferred-mark { color: var(--amb-danger-text); }
|