WhatDoWeSee / style.css
StephanMeijer's picture
Drop hint on top of the image after an upload
230752a verified
Raw History Blame Contribute Delete
4.23 kB
:root {
--bg: #f7f7f4;
--surface: #ffffff;
--text: #1c1c1a;
--muted: #6d6c67;
--line: #deddd7;
--accent: #3657c9;
--accent-soft: #e4e9fb;
--bar: #c9d3f5;
--bar-on: #3657c9;
--tick: #c2410c;
color-scheme: light;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #151514;
--surface: #1f1f1d;
--text: #ecebe6;
--muted: #a19f98;
--line: #363531;
--accent: #8ba4ff;
--accent-soft: #263055;
--bar: #2d3656;
--bar-on: #8ba4ff;
--tick: #fb923c;
color-scheme: dark;
}
}
* {
box-sizing: border-box;
}
/* `hidden` must win over the display rules below. */
[hidden] {
display: none !important;
}
body {
margin: 0;
background: var(--bg);
color: var(--text);
font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main {
max-width: 1100px;
margin: 0 auto;
padding: 1.5rem 16px 2rem;
}
h1 {
margin: 0 0 0.3rem;
font-size: 1.6rem;
letter-spacing: -0.01em;
}
.lede {
margin: 0 0 1rem;
color: var(--muted);
max-width: 60ch;
}
.lede strong {
color: var(--text);
}
.model {
display: inline-flex;
gap: 0.5rem;
align-items: center;
color: var(--muted);
font-size: 0.9rem;
}
select {
font: inherit;
color: var(--text);
background: var(--surface);
border: 1px solid var(--line);
border-radius: 6px;
padding: 0.3rem 0.5rem;
}
.work {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: 1.25rem;
margin-top: 1.25rem;
align-items: start;
}
@media (max-width: 760px) {
.work {
grid-template-columns: 1fr;
}
}
.drop {
position: relative;
min-height: 320px;
border: 2px dashed var(--line);
border-radius: 12px;
background: var(--surface);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: pointer;
overflow: hidden;
transition: border-color 0.15s, background 0.15s;
}
.drop:hover,
.drop:focus-visible,
.drop.over {
border-color: var(--accent);
background: var(--accent-soft);
outline: none;
}
.drop img {
max-width: 100%;
max-height: 70vh;
display: block;
}
.hint {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
color: var(--muted);
text-align: center;
padding: 1rem;
}
.hint strong {
color: var(--text);
font-size: 1.05rem;
}
/* With an image shown: a slim bar on top that invites the next one, the image below it. */
.drop.has-image {
justify-content: flex-start;
min-height: 0;
}
.drop.has-image .hint {
flex-direction: row;
align-self: stretch;
justify-content: center;
gap: 0.4rem;
padding: 0.45rem 0.75rem;
font-size: 0.85rem;
border-bottom: 1px solid var(--line);
}
.drop.has-image .hint strong {
font-size: 0.85rem;
}
.drop.has-image img {
padding: 0.75rem;
}
.results {
background: var(--surface);
border: 1px solid var(--line);
border-radius: 12px;
padding: 1rem;
}
.status {
margin: 0 0 0.6rem;
color: var(--muted);
}
.chips {
list-style: none;
padding: 0;
margin: 0 0 1rem;
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
}
.chips li {
background: var(--accent);
color: var(--surface);
border-radius: 999px;
padding: 0.25rem 0.75rem;
font-weight: 600;
font-size: 0.9rem;
}
.chips li.none {
background: var(--accent-soft);
color: var(--muted);
font-weight: 400;
}
table {
width: 100%;
border-collapse: collapse;
font-variant-numeric: tabular-nums;
font-size: 0.9rem;
}
th,
td {
text-align: left;
padding: 0.28rem 0.4rem;
border-bottom: 1px solid var(--line);
}
th {
color: var(--muted);
font-weight: 500;
font-size: 0.8rem;
}
.num {
text-align: right;
width: 3.5rem;
}
.muted {
color: var(--muted);
}
tr.on td:first-child {
font-weight: 600;
}
.track {
position: relative;
height: 10px;
border-radius: 5px;
background: var(--line);
min-width: 120px;
}
.fill {
position: absolute;
inset: 0 auto 0 0;
border-radius: 5px;
background: var(--bar);
}
tr.on .fill {
background: var(--bar-on);
}
.tick {
position: absolute;
top: -3px;
bottom: -3px;
width: 2px;
background: var(--tick);
}
footer {
margin-top: 1.5rem;
color: var(--muted);
font-size: 0.82rem;
}
a {
color: var(--accent);
}