Spaces:
Runtime error
Runtime error
Download src/web/static/css/ui-busy.css from BattleFiven/ai-tester-platform: direct link, hf CLI and curl.
- Browser
- Download file 9.12 kB
-
https://huggingface.co/spaces/BattleFiven/ai-tester-platform/resolve/main/src/web/static/css/ui-busy.css
- Command line
-
hf download hf://spaces/BattleFiven/ai-tester-platform/src/web/static/css/ui-busy.css
-
curl -L -o ui-busy.css https://huggingface.co/spaces/BattleFiven/ai-tester-platform/resolve/main/src/web/static/css/ui-busy.css
9.12 kB
| /* Spinner + busy state styles for runBusy / dsBusy helpers | |
| * defined in static/js/app.js. Kept in a standalone file so we don't | |
| * have to rebuild the Tailwind bundle for runtime changes. */ | |
| /* Alpine.js requires this rule to hide [x-cloak] elements until the | |
| * framework boots, otherwise they flash visible. Used by the scenarios | |
| * wizard (step 2/3 panels) and any future Alpine-driven UI. */ | |
| [x-cloak] { display: none ; } | |
| .ds-spinner { | |
| display: inline-block; | |
| width: 14px; | |
| height: 14px; | |
| border-radius: 50%; | |
| border: 2px solid currentColor; | |
| border-right-color: transparent; | |
| animation: ds-spinner-rotate 0.7s linear infinite; | |
| vertical-align: -2px; | |
| margin-right: 6px; | |
| flex: 0 0 auto; | |
| } | |
| .ds-spinner--lg { | |
| width: 28px; | |
| height: 28px; | |
| border-width: 3px; | |
| margin-right: 10px; | |
| vertical-align: -8px; | |
| } | |
| .ds-busy-label { | |
| display: inline-block; | |
| vertical-align: baseline; | |
| } | |
| @keyframes ds-spinner-rotate { | |
| to { transform: rotate(360deg); } | |
| } | |
| button[aria-busy="true"] { | |
| cursor: progress; | |
| opacity: 0.8; | |
| } | |
| /* Page-level overlay used by window.dsBusy.show()/.hide(). */ | |
| .ds-page-overlay { | |
| position: fixed; | |
| inset: 0; | |
| z-index: 9999; | |
| display: none; | |
| align-items: center; | |
| justify-content: center; | |
| background: rgba(15, 17, 22, 0.42); | |
| backdrop-filter: blur(2px); | |
| -webkit-backdrop-filter: blur(2px); | |
| } | |
| .ds-page-overlay.is-visible { | |
| display: flex; | |
| } | |
| .ds-page-overlay__panel { | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| padding: 16px 22px; | |
| border-radius: 8px; | |
| background: hsl(var(--background, 0 0% 100%)); | |
| color: hsl(var(--foreground, 222 47% 11%)); | |
| box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); | |
| font-size: 0.95rem; | |
| font-weight: 500; | |
| } | |
| /* Row-action ghost buttons (small) need a visible affordance: in data | |
| * tables they were rendering as plain text (no border, no background), | |
| * making them easy to miss. We give them a subtle outline that becomes | |
| * more prominent on hover/focus. Scoped to `--sm` so we don't affect | |
| * larger ghost buttons used as section actions in headers. */ | |
| .cds--btn.cds--btn--ghost.cds--btn--sm { | |
| border: 1px solid hsl(var(--border, 220 14% 90%)); | |
| background: hsl(var(--background, 0 0% 100%)); | |
| } | |
| .cds--btn.cds--btn--ghost.cds--btn--sm:hover { | |
| border-color: hsl(var(--accent-foreground, 220 9% 35%) / 0.4); | |
| } | |
| .cds--btn.cds--btn--ghost.cds--btn--sm:focus-visible { | |
| outline: 2px solid hsl(var(--ring, 222 84% 60%)); | |
| outline-offset: 2px; | |
| } | |
| /* Inline progress hint inside form sections — used by validate flow | |
| * when the operator is waiting for a long server-side parse. */ | |
| .ds-inline-progress { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 12px 14px; | |
| border: 1px dashed hsl(var(--border, 220 14% 90%)); | |
| border-radius: 8px; | |
| background: hsl(var(--muted, 220 14% 96%) / 0.45); | |
| font-size: 0.9rem; | |
| color: hsl(var(--muted-foreground, 220 9% 46%)); | |
| } | |
| .ds-inline-progress[hidden] { display: none ; } | |
| /* The bundled `.ds-checkbox` rule (design/entry.css) uses Tailwind's | |
| * `data-[state=checked]:bg-primary` arbitrary variant — that's a | |
| * Radix-state attribute pattern and never fires on plain HTML | |
| * <input type="checkbox" checked>. Result: native checkboxes show only | |
| * the small CSS `::after` checkmark with no fill, which reads as | |
| * "broken" to operators. We add a real `:checked` background fill + | |
| * hover affordance here so the native control is unambiguously on/off | |
| * without rebuilding the Tailwind bundle. */ | |
| .ds-checkbox:checked { | |
| background-color: hsl(var(--primary, 222 47% 50%)); | |
| border-color: hsl(var(--primary, 222 47% 50%)); | |
| } | |
| .ds-checkbox:checked::after { | |
| border-color: hsl(var(--primary-foreground, 0 0% 100%)); | |
| } | |
| .ds-checkbox:hover:not(:disabled) { | |
| border-color: hsl(var(--primary, 222 47% 50%)); | |
| } | |
| /* =================================================================== | |
| * Button + input size normalization | |
| * =================================================================== | |
| * | |
| * Il bundle (design/legacy-shim.css) definisce `cds--btn--sm` come | |
| * h-8 (32px) e `cds--btn--icon-only` come h-10 w-10 (40px). Quando | |
| * un button ha entrambe le classi (es. il kebab "Altre azioni" nelle | |
| * tabelle: `cds--btn cds--btn--ghost cds--btn--sm cds--btn--icon-only`) | |
| * la cascade ordina --sm prima e --icon-only dopo → l'icon-only vince e | |
| * il button è 40px alto, mentre la primary CTA "Riesegui" accanto è | |
| * `cds--btn cds--btn--primary cds--btn--sm` → 32px. 8px di scarto | |
| * visibile. Stesso problema con --tertiary --sm + --icon-only. | |
| * | |
| * Convenzione del progetto: | |
| * - default (`cds--btn`) = 40px alto, padding 16px, testo 14px | |
| * - small (`cds--btn--sm`) = 32px alto, padding 12px, testo 12px | |
| * - icon-only square = stesso h della modifier-size, padding 0 | |
| * | |
| * Le regole sotto forzano la convenzione tramite specificità più alta | |
| * (compound selector `.cds--btn--sm.cds--btn--icon-only`). Niente | |
| * !important: gli inline style runtime (es. width:80px) restano liberi | |
| * di override. | |
| */ | |
| /* Icon-only piccolo = quadrato 32px (matches --sm text button) */ | |
| .cds--btn.cds--btn--sm.cds--btn--icon-only { | |
| height: 2rem; /* 32px = h-8 */ | |
| width: 2rem; | |
| padding: 0; | |
| min-height: 2rem; | |
| } | |
| /* Icon-only default = quadrato 40px (matches default text button) */ | |
| .cds--btn.cds--btn--icon-only:not(.cds--btn--sm) { | |
| height: 2.5rem; /* 40px = h-10 */ | |
| width: 2.5rem; | |
| padding: 0; | |
| } | |
| /* Inputs accanto a button --sm: forza h-8 quando hanno la classe | |
| * `--sm-input` (opt-in, non rompe gli input esistenti). Evita l'8px di | |
| * scarto verticale tra `<input class="cds--text-input">` (h-10) e | |
| * `<button class="cds--btn--sm">` (h-8). */ | |
| .cds--text-input.cds--text-input--sm, | |
| .cds--select-input.cds--select-input--sm { | |
| height: 2rem; | |
| font-size: 0.75rem; /* text-xs come btn--sm */ | |
| padding-left: 0.75rem; | |
| padding-right: 0.75rem; | |
| } | |
| /* Allineamento verticale dei gruppi button + button (es. Riesegui + | |
| * kebab nella riga sessioni). I container .session-actions usano flex | |
| * gap ma se uno dei child non ha height esplicita le icone bilanciano | |
| * malamente: forziamo align-items center. */ | |
| .session-actions { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.375rem; /* 6px */ | |
| flex-wrap: nowrap; | |
| justify-content: flex-end; | |
| } | |
| /* Inline action groups generici (es. nelle modali, sopra le tabelle) — | |
| * stessa logica di sopra. Usa la classe opt-in `.ds-action-group` per | |
| * non toccare layout esistenti involontariamente. */ | |
| .ds-action-group { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| /* Menu item fill width | |
| * =================== | |
| * `.ds-menu-item` (in design/entry.css) è `display: flex` con `width: auto` | |
| * di default → ogni voce si dimensiona al proprio contenuto (hug). Risultato: | |
| * "Vedi report" e "Modifica sessione" hanno hover highlight stretto al | |
| * contenuto invece di riempire l'intero menu. Forziamo `width: 100%` qui | |
| * così la hover area copre l'intera riga. */ | |
| .ds-menu-item { | |
| width: 100%; | |
| box-sizing: border-box; | |
| } | |
| /* L'`<a>` può ereditare text-decoration: normalizziamo per parità con | |
| * `<button>` menu items. */ | |
| .ds-menu .ds-menu-item, | |
| .ds-dropdown-content .ds-menu-item { | |
| text-decoration: none; | |
| color: inherit; | |
| } | |
| /* Dropdown content width = longest item | |
| * ===================================== | |
| * Dopo il portal a `<body>` con `position: fixed` (vedi dropdown.js), | |
| * `.ds-dropdown-content` non ha più un parent stretto e — combinata con | |
| * la regola `.ds-menu-item { width: 100% }` di sopra — si dilatava fino | |
| * a viewport-wide perché gli item flex stretchavano e il container | |
| * adattava la larghezza ai children con `width: 100%` (calcolo | |
| * shrink-to-fit non determinabile, fallback a contenuto disponibile = | |
| * full body). Forziamo `width: max-content` così il container si | |
| * dimensiona alla voce più lunga; gli item con `width: 100%` riempiono | |
| * quella misura. `max-width` evita che un'eventuale label kilometrica | |
| * sfori la viewport. */ | |
| .ds-dropdown-content { | |
| width: max-content; | |
| max-width: calc(100vw - 16px); | |
| } | |
| /* AIS grade text colors — classi custom (NOT Tailwind) per evitare il | |
| * purge che eliminava `text-emerald-700`/`text-amber-400` ecc. perché | |
| * non referenziate in template HTML scansionati. Sono usate da | |
| * /static/js/ui/ais-grade.js per colorare il numero p_hat in base alla | |
| * fascia (Eccellente/Buono/Mediocre/Insufficiente). */ | |
| .ais-grade-emerald-strong { color: #047857; font-weight: 600; } /* >=95% Eccellente */ | |
| .ais-grade-green { color: #059669; font-weight: 600; } /* 85-94 Buono */ | |
| .ais-grade-amber { color: #d97706; font-weight: 600; } /* 75-84 Mediocre */ | |
| .ais-grade-red { color: #dc2626; font-weight: 600; } /* <75 Insufficiente */ | |
| :where(.dark) .ais-grade-emerald-strong, | |
| :where([data-theme="dark"]) .ais-grade-emerald-strong { color: #6ee7b7; } | |
| :where(.dark) .ais-grade-green, | |
| :where([data-theme="dark"]) .ais-grade-green { color: #34d399; } | |
| :where(.dark) .ais-grade-amber, | |
| :where([data-theme="dark"]) .ais-grade-amber { color: #fbbf24; } | |
| :where(.dark) .ais-grade-red, | |
| :where([data-theme="dark"]) .ais-grade-red { color: #f87171; } | |