fix(web): collapse subtitles into one row chip (#258)
This commit was merged in pull request #258.
This commit is contained in:
+78
-8
@@ -1730,13 +1730,83 @@ body {
|
||||
|
||||
/* ---- subtitle status (§15, §9.6, issue #201) --------------------------- */
|
||||
|
||||
/* forces the subtitle row below a disk-row's or episode's own line, the
|
||||
same 100%-basis trick .rel-name uses to keep the release name secondary */
|
||||
.subtitle-line {
|
||||
flex-basis: 100%;
|
||||
padding-top: var(--space-1);
|
||||
margin-top: var(--space-1);
|
||||
border-top: 1px solid oklch(from var(--line) l c h / 30%);
|
||||
/* the one subtitle chip a file's row carries (§9.6 keeps a file to one
|
||||
line): it names the wanted languages and opens the panel, so it is a
|
||||
button wearing the chip's geometry rather than a second control idiom */
|
||||
.subs-chip {
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
color 150ms var(--ease-out),
|
||||
border-color 150ms var(--ease-out);
|
||||
}
|
||||
|
||||
.subs-chip .icon {
|
||||
height: 0.75rem;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* the comma between two codes belongs to the string, so the languages sit
|
||||
in their own gapless run inside the chip. Its width is set from the
|
||||
wanted set (see `summaryWidth`) rather than from the row's own content:
|
||||
the same fixed-column reasoning as `.cw`, so a chip that says `en` is as
|
||||
wide as one that says `pt-PT,en`. */
|
||||
.subs-chip-langs {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
flex: none;
|
||||
gap: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* the satisfied check has a slot whether or not it is drawn — a language
|
||||
landing must not shove the chips after it sideways */
|
||||
.subs-chip-mark {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
justify-content: center;
|
||||
width: 0.75rem;
|
||||
}
|
||||
|
||||
/* §15: a machine translation reads as machine-made at a glance. The chip has
|
||||
no room for the word, so the language carries a dotted mark and the title
|
||||
spells the origin out in full. */
|
||||
.subs-chip-langs [data-mt="true"] {
|
||||
text-decoration: underline dotted;
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
|
||||
/* amber is §4.2's own hue for wanted and not yet on disk; a satisfied chip
|
||||
takes the eligible green through the shared [data-verdict] rule */
|
||||
.chip[data-verdict="wanted"] {
|
||||
color: var(--signal-warn);
|
||||
border-color: oklch(from var(--signal-warn) l c h / 55%);
|
||||
}
|
||||
|
||||
.subs-chip:hover,
|
||||
.subs-chip:focus-visible,
|
||||
.subs-chip[aria-expanded="true"] {
|
||||
border-color: currentcolor;
|
||||
}
|
||||
|
||||
/* the panel's own list of what is on the file: every track, including the
|
||||
languages nobody asked for and the forced ones the row's chip elides */
|
||||
.subs-present {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
padding: var(--space-3) var(--space-1) 0;
|
||||
}
|
||||
|
||||
/* a chip whose whole label is its glyph: the words live in the title and the
|
||||
aria-label, so the box shrinks to the icon rather than to a truncated
|
||||
sentence */
|
||||
.chip-glyph {
|
||||
min-width: var(--control-h);
|
||||
justify-content: center;
|
||||
padding: 0 var(--space-2);
|
||||
}
|
||||
|
||||
/* a machine translation reads as machine-made at a glance (§15) — the same
|
||||
@@ -2226,7 +2296,7 @@ body {
|
||||
/* the state chip stays, and so does a flag — a vanished episode is a
|
||||
conflict, not an attribute. Resolution, language and the waived-rule
|
||||
chip go; they are what a wide screen is for. */
|
||||
.ep-chips .chip:not([data-movie-state]):not([data-flag]) {
|
||||
.ep-chips .chip:not([data-movie-state]):not([data-flag]):not(.subs-chip) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user