Spaces:
Running
Running
Download src/index.css from linoyts/Qwen-Image-2.1-WebGPU: direct link, hf CLI and curl.
- Browser
- Download file 11.4 kB
-
https://huggingface.co/spaces/linoyts/Qwen-Image-2.1-WebGPU/resolve/main/src/index.css
- Command line
-
hf download hf://spaces/linoyts/Qwen-Image-2.1-WebGPU/src/index.css
-
curl -L -o index.css https://huggingface.co/spaces/linoyts/Qwen-Image-2.1-WebGPU/resolve/main/src/index.css
11.4 kB
| @tailwind base; | |
| :root { | |
| --bg: #f4f1ea; --surface: #fffdf8; --ink: #211d17; --muted: #786f64; --faint: #bbb2a6; --line: #e7e0d4; | |
| --accent: #b45309; --accent-soft: rgb(180 83 9 / .14); --btn: #f5a524; --on-btn: #211d17; --err: #b3261e; | |
| --shadow: 0 1px 2px rgb(33 29 23 / .05), 0 10px 30px rgb(33 29 23 / .07); | |
| --hero-shadow: 0 30px 80px rgb(33 29 23 / .18); | |
| --serif: "Fraunces", Georgia, "Times New Roman", serif; | |
| color-scheme: light; | |
| } | |
| @media (prefers-color-scheme: dark) { | |
| :root { | |
| --bg: #121110; --surface: #1d1b18; --ink: #f3efe8; --muted: #a39a8f; --faint: #5b554d; --line: #2d2a25; | |
| --accent: #fbbf24; --accent-soft: rgb(251 191 36 / .2); --btn: #fbbf24; --on-btn: #121110; --err: #ff8a80; | |
| --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 30px rgb(0 0 0 / .35); | |
| --hero-shadow: 0 30px 80px rgb(0 0 0 / .55); | |
| color-scheme: dark; | |
| } | |
| } | |
| html, body { min-height: 100%; margin: 0; background: var(--bg); color: var(--ink); } | |
| body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; } | |
| img, canvas { max-width: 100%; } | |
| [hidden] { display: none ; } | |
| .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } | |
| .app { --hero: min(620px, calc(100dvh - 150px), 46vw); min-height: 100dvh; display: flex; flex-direction: column; padding: 24px 32px 32px; } | |
| .foot { margin-top: 20px; color: var(--muted); font-size: 12px; text-align: center; overflow-wrap: anywhere; } | |
| /* Header */ | |
| .top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; } | |
| .pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; | |
| background: var(--surface); color: var(--muted); text-decoration: none; white-space: nowrap; box-shadow: var(--shadow); cursor: pointer; } | |
| .brand { color: var(--ink); font-weight: 650; } | |
| .brand small { color: var(--muted); font-weight: 450; font-size: inherit; } | |
| .icon { width: 40px; padding: 0; justify-content: center; } | |
| .seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; } | |
| .seg button { min-height: 32px; padding: 0 14px; border-radius: 999px; color: var(--muted); cursor: pointer; white-space: nowrap; } | |
| .seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); } | |
| .seg button:disabled { cursor: default; } | |
| .seg.small button { min-height: 30px; padding: 0 11px; font-size: 13.5px; font-variant-numeric: tabular-nums; } | |
| /* Info popover */ | |
| .info-wrap { position: relative; } | |
| .info { position: absolute; right: 0; top: 50px; z-index: 5; width: min(340px, calc(100vw - 32px)); max-height: calc(100dvh - 100px); | |
| overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 10px; border-radius: 18px; background: var(--surface); | |
| box-shadow: var(--shadow), 0 20px 50px rgb(0 0 0 / .18); font-size: 14px; animation: pop .16s ease-out; } | |
| .info h2 { margin: 0 0 6px; font: 400 22px/1.1 var(--serif); } | |
| .info p { margin: 0 0 10px; color: var(--muted); } | |
| .info dl { margin: 8px 0 0; font-variant-numeric: tabular-nums; } | |
| .info dl div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; } | |
| .info dt { color: var(--muted); min-width: 0; } | |
| .info dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; } | |
| .info .sum { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); font-weight: 650; } | |
| .info .sum dt { color: var(--ink); } | |
| .info .check { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--muted); } | |
| .info .check input { flex: none; margin-top: 3px; accent-color: var(--btn); } | |
| .info .label { margin: 14px 0 2px; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; } | |
| .info a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); | |
| color: var(--ink); text-decoration: none; } | |
| .info a small { color: var(--muted); font-size: 13px; text-align: right; min-width: 0; overflow-wrap: anywhere; } | |
| .info .fine { margin: 8px 0 0; font-size: 12px; } | |
| @media (hover: hover) { .info a:hover span { text-decoration: underline; text-underline-offset: 3px; } } | |
| /* Stage */ | |
| .stage { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) var(--hero); align-items: center; | |
| gap: clamp(28px, 5vw, 72px); padding: 20px clamp(0px, 3vw, 48px) 8px; } | |
| .words { min-width: 0; display: flex; flex-direction: column; gap: 22px; } | |
| .kicker { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; min-width: 0; } | |
| .sentence { position: relative; font-family: var(--serif); font-weight: 300; font-variation-settings: "opsz" 120; | |
| line-height: 1.08; letter-spacing: -.015em; font-size: var(--size); } | |
| .sentence.xl { --size: clamp(42px, 5.2vw, 76px); } | |
| .sentence.lg { --size: clamp(36px, 4.2vw, 60px); } | |
| .sentence.md { --size: clamp(30px, 3.3vw, 48px); } | |
| .sentence.sm { --size: clamp(24px, 2.5vw, 36px); } | |
| .mirror, .sentence textarea { margin: 0; padding: 0; font: inherit; font-variation-settings: inherit; letter-spacing: inherit; | |
| white-space: pre-wrap; overflow-wrap: break-word; } | |
| .mirror { min-height: 1.08em; } | |
| .mirror .done { color: var(--ink); } | |
| .mirror .todo { color: var(--muted); text-decoration: underline 2px var(--accent); text-underline-offset: .14em; } | |
| .mirror .ph { color: var(--faint); } | |
| .sentence textarea { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; outline: 0; resize: none; overflow: hidden; | |
| background: transparent; color: transparent; caret-color: var(--accent); } | |
| .sentence textarea::selection { background: var(--accent-soft); } | |
| .controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } | |
| .go { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 20px; border-radius: 999px; background: var(--btn); | |
| color: var(--on-btn); font-weight: 650; cursor: pointer; box-shadow: 0 6px 20px rgb(0 0 0 / .18); max-width: 100%; text-align: left; } | |
| .go:disabled { opacity: .5; cursor: default; } | |
| .go kbd { padding: 0 6px; border-radius: 6px; background: rgb(0 0 0 / .12); font: 12px/1.6 ui-monospace, monospace; } | |
| .seed { gap: 6px; padding: 0 6px 0 14px; color: var(--muted); cursor: default; } | |
| .seed input { width: 9ch; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; outline: 0; } | |
| .seed input:focus-visible { box-shadow: 0 1.5px 0 var(--accent); } | |
| .seed button { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; } | |
| .seed button:hover { background: var(--line); } | |
| .film { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 4px; margin: -4px -4px 0; } | |
| .shot { flex: none; width: 84px; padding: 0; text-align: left; cursor: pointer; animation: slide .35s cubic-bezier(.2,.9,.3,1.1); } | |
| .shot:disabled { cursor: default; } | |
| .shot img { display: block; width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--line); opacity: .8; transition: opacity .15s; } | |
| .shot span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } | |
| .shot.on img { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); } | |
| .shot.on span { color: var(--ink); } | |
| .picks { display: flex; flex-wrap: wrap; gap: 8px; } | |
| .pick { min-height: 36px; padding: 0 14px; color: var(--ink); font-size: 14px; } | |
| @media (hover: hover) { | |
| .pick:hover, .seg button:not([aria-selected="true"]):not([aria-checked="true"]):not(:disabled):hover { box-shadow: 0 0 0 1.5px var(--accent); } | |
| .shot:not(:disabled):hover img { opacity: 1; } | |
| } | |
| /* Edit mode: the photo card */ | |
| .source { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; min-width: 0; } | |
| .drop { position: relative; flex: none; width: 150px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--line); | |
| box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; } | |
| .drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } | |
| .drop.over { box-shadow: 0 0 0 3px var(--accent); } | |
| .drop-empty { color: var(--muted); font-size: 34px; line-height: 1; margin-bottom: 18px; } | |
| .drop .tag { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 9px; border-radius: 999px; | |
| background: rgb(0 0 0 / .55); color: #fff; font-size: 12px; backdrop-filter: blur(6px); overflow-wrap: anywhere; } | |
| /* The picture */ | |
| .hero { position: relative; margin: 0; width: var(--hero); aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line); | |
| box-shadow: var(--hero-shadow); } | |
| .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: arrive .3s ease-out; } | |
| .hero img.behind { animation: none; } | |
| .hero.busy img { filter: blur(6px) saturate(.8); transform: scale(1.02); transition: filter .4s, transform .4s; } | |
| .placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); | |
| font: 300 clamp(22px, 2.4vw, 32px)/1.2 var(--serif); } | |
| .overlay { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; | |
| gap: 10px; background: linear-gradient(to top, rgb(0 0 0 / .45), transparent); } | |
| .badge { max-width: 100%; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .92); color: #211d17; font-size: 14px; | |
| font-weight: 600; font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); overflow-wrap: anywhere; text-decoration: none; } | |
| .badge.err { color: #b3261e; font-weight: 500; line-height: 1.35; border-radius: 14px; white-space: pre-wrap; max-height: 40%; overflow: auto; } | |
| .corner { position: absolute; left: 16px; bottom: 16px; z-index: 1; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 32px); } | |
| .bar { width: 100%; height: 4px; border-radius: 2px; background: rgb(255 255 255 / .3); overflow: hidden; } | |
| .bar div { height: 100%; width: 0; background: #fff; transition: width .15s linear; } | |
| @media (max-width: 900px) { | |
| .app { --hero: min(620px, calc(100vw - 32px)); padding: 16px 16px 28px; } | |
| .stage { grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: start; gap: 22px; padding: 14px 0 0; } | |
| .hero { order: -1; } | |
| .words { width: 100%; gap: 18px; } | |
| .sentence.xl { --size: clamp(32px, 8.5vw, 52px); } | |
| .sentence.lg { --size: clamp(28px, 7vw, 44px); } | |
| .sentence.md { --size: clamp(24px, 5.8vw, 36px); } | |
| .sentence.sm { --size: clamp(21px, 4.8vw, 30px); } | |
| .shot, .shot img { width: 68px; } | |
| .shot img { height: 68px; } | |
| .drop { width: 120px; } | |
| } | |
| @media (max-width: 520px) { | |
| .brand small { display: none; } | |
| .top .seg { order: 3; width: 100%; } | |
| .top .seg button { flex: 1 1 0; min-width: 0; } | |
| } | |
| @keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } } | |
| @keyframes arrive { from { opacity: 0; filter: blur(10px); transform: scale(1.02); } } | |
| @keyframes slide { from { opacity: 0; transform: translateX(16px); } } | |
| @media (prefers-reduced-motion: reduce) { .hero img, .shot, .info { animation: none; transition: none; } } | |