Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Flatten primary buttons

Bitti86885223f772
diff --git a/src/styles/controls.css b/src/styles/controls.css
index 6f7cc3d..b457fe9 100644
--- a/src/styles/controls.css
+++ b/src/styles/controls.css
@@ -17,31 +17,39 @@
font-size: var(--text-sm);
font-weight: var(--weight-semibold);
line-height: var(--leading-snug);
- transition: 0.18s ease;
}
-/* Primary actions are the hero control size. */
+/* tokens.css rule 5: primary actions are --control-md; --control-lg is for hero
+ CTAs. Setting every primary to --control-lg made every primary a hero CTA. */
.primary-button {
- min-height: var(--control-lg);
- padding: 0 var(--space-5);
- font-size: var(--text-base);
- border: 1px solid var(--button-primary-border);
+ min-height: var(--control-md);
+ padding: 0 var(--space-4);
+ font-size: var(--text-sm);
+ border: 1px solid transparent;
color: var(--on-accent);
background: var(--button-primary-bg);
- box-shadow:
- var(--button-primary-shadow),
- inset 0 1px var(--sheen);
+ box-shadow: none;
+ transition: background-color var(--motion-fast) ease;
}
-.primary-button:hover:not(:disabled) {
- filter: brightness(1.1);
- transform: translateY(-1px);
+.primary-button:hover:not(:disabled) { background: var(--button-primary-hover); }
+.primary-button:active:not(:disabled) { background: var(--button-primary-active); }
+
+/* opacity on a saturated fill produces a hazy blue that reads as a rendering
+ fault rather than as "off". */
+.primary-button:disabled {
+ opacity: 1;
+ border-color: var(--line);
+ color: var(--button-primary-off-ink);
+ background: var(--button-primary-off-bg);
+ cursor: not-allowed;
}
.secondary-button {
border: 1px solid var(--line-strong);
color: var(--text-secondary);
background: var(--wash-1);
+ transition: 0.18s ease;
}
.secondary-button:hover:not(:disabled) {
@@ -50,7 +58,6 @@
background: var(--wash-2);
}
-.primary-button:disabled,
.secondary-button:disabled {
opacity: 0.5;
cursor: not-allowed;
diff --git a/src/styles/tokens.css b/src/styles/tokens.css
index 5928f09..462fc46 100644
--- a/src/styles/tokens.css
+++ b/src/styles/tokens.css
@@ -111,6 +111,10 @@
--topbar-height: 72px;
--content-max: 1180px;
+ /* Step 1's primary button transition consumes this immediately. Step 2 adds
+ the slower panel duration and the full motion policy. */
+ --motion-fast: 120ms;
+
/* ==========================================================================
COLOUR — dark (the base palette; light redefines every name below)
====================================================================== */
@@ -178,7 +182,6 @@
sits on them is white in both. Deliberately theme-independent. */
--on-accent: #ffffff;
--on-accent-dim: rgba(255, 255, 255, 0.35);
- --sheen: rgba(255, 255, 255, 0.15);
/* --- The export stage -----------------------------------------------------
The stage behind the picture stays BLACK in both themes on purpose: a
@@ -192,10 +195,17 @@
--stage-alert-ink: #f19aa1; /* 9.3:1 on --stage-alert-bg over the stage */
--stage-alert-line: rgba(236, 125, 134, 0.45);
- /* --- Primary button ----------------------------------------------------- */
- --button-primary-bg: linear-gradient(180deg, #5279f4, #3159d4);
- --button-primary-border: #5578ed;
- --button-primary-shadow: 0 5px 18px rgba(31, 70, 196, 0.26);
+ /* --- Primary button -----------------------------------------------------
+ One flat fill. No gradient, no border, no coloured shadow, no inner sheen:
+ the five effects that used to stack here were compensating for a topbar
+ with four other blue objects in it, which step 4 removes. */
+ --button-primary-bg: #3557c7; /* white on it is 6.3:1 */
+ --button-primary-hover: #3f64d9; /* 5.2:1 — lighter, as dark-theme hover should be */
+ --button-primary-active: #2c49ac; /* 7.9:1 */
+ --button-primary-off-bg: var(--wash-2); /* disabled is a state, not a transparency */
+ --button-primary-off-ink: var(--text-faint); /* 5.1:1 over the wash on --panel */
+ /* The dock's send button keeps a visible edge of its own. */
+ --dock-send-border: #5578ed;
/* --- Progress ----------------------------------------------------------- */
--track: #20252e;
@@ -324,6 +334,11 @@
--glow-accent: rgba(45, 91, 215, 0.07);
--eyebrow: #47549a; /* 6.6:1 on --panel */
+ --button-primary-bg: #2d5bd7; /* white on it is 5.9:1 — the old --accent-fill value */
+ --button-primary-hover: #2450c4; /* 7.0:1 */
+ --button-primary-active: #1e40af; /* 8.7:1 */
+ --dock-send-border: #2d5bd7;
+
--track: #dfe3ec;
--progress-fill: linear-gradient(90deg, #1e4fd0, #4573e4);
--progress-glow: rgba(45, 91, 215, 0.35);
@@ -423,6 +438,11 @@
--glow-accent: rgba(45, 91, 215, 0.07);
--eyebrow: #47549a;
+ --button-primary-bg: #2d5bd7;
+ --button-primary-hover: #2450c4;
+ --button-primary-active: #1e40af;
+ --dock-send-border: #2d5bd7;
+
--track: #dfe3ec;
--progress-fill: linear-gradient(90deg, #1e4fd0, #4573e4);
--progress-glow: rgba(45, 91, 215, 0.35);
diff --git a/src/styles/workspace.css b/src/styles/workspace.css
index cf7e75f..bb6a088 100644
--- a/src/styles/workspace.css
+++ b/src/styles/workspace.css
@@ -77,11 +77,6 @@
white-space: nowrap;
}
-/* Match the primary action height so the row reads as one band of controls. */
-.project-topbar__actions .secondary-button {
- min-height: var(--control-lg);
-}
-
.project-topbar__soon {
padding: var(--space-1) var(--space-2);
border: 1px solid var(--line);
@@ -284,7 +279,7 @@
display: grid;
place-items: center;
padding: 0;
- border: 1px solid var(--button-primary-border);
+ border: 1px solid var(--dock-send-border);
border-radius: var(--radius-sm);
color: var(--on-accent);
background: var(--accent-fill);