Skip to content

Commit 5aff084

Browse files
committed
fix(web): tune shared ui typography emphasis
1 parent af2ef87 commit 5aff084

6 files changed

Lines changed: 47 additions & 43 deletions

File tree

packages/web/src/components/ui/button/index.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
border-radius: var(--radius-md);
1111
font-family: var(--font-sans);
1212
font-size: var(--type-body-strong-size);
13-
font-weight: var(--type-body-strong-weight);
13+
font-weight: var(--font-medium);
1414
line-height: var(--type-body-strong-line-height);
1515
white-space: nowrap;
1616
transition:
@@ -84,7 +84,7 @@
8484
padding: 0 var(--sp-2);
8585
border-radius: var(--radius-sm);
8686
font-size: var(--type-label-size);
87-
font-weight: var(--type-label-weight);
87+
font-weight: var(--font-medium);
8888
line-height: var(--type-label-line-height);
8989
}
9090

packages/web/src/styles/base.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ h3 {
5858
h4 {
5959
font-size: var(--type-body-strong-size);
6060
line-height: var(--type-body-strong-line-height);
61-
font-weight: var(--type-body-strong-weight);
61+
font-weight: var(--type-app-title-weight);
6262
color: var(--text-primary);
6363
}
6464
h5 {
6565
font-size: var(--type-label-size);
6666
line-height: var(--type-label-line-height);
67-
font-weight: var(--type-label-weight);
67+
font-weight: var(--type-app-title-weight);
6868
color: var(--text-primary);
6969
}
7070
h6 {
@@ -84,7 +84,7 @@ p {
8484
.section-title {
8585
font-size: var(--type-kicker-size);
8686
line-height: var(--type-kicker-line-height);
87-
font-weight: var(--type-kicker-weight);
87+
font-weight: var(--type-app-title-weight);
8888
text-transform: uppercase;
8989
letter-spacing: var(--type-kicker-letter-spacing);
9090
color: var(--text-tertiary);

packages/web/src/styles/components.css

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,7 +2442,7 @@ body.is-resizing-panels * {
24422442
color: var(--bg);
24432443
font-size: var(--type-body-strong-size);
24442444
line-height: var(--type-body-strong-line-height);
2445-
font-weight: var(--type-body-strong-weight);
2445+
font-weight: var(--font-medium);
24462446
border: none;
24472447
cursor: pointer;
24482448
font-family: var(--sans);
@@ -4855,7 +4855,7 @@ body.is-resizing-panels * {
48554855
border-radius: 14px;
48564856
font-size: var(--type-body-strong-size);
48574857
line-height: var(--type-body-strong-line-height);
4858-
font-weight: var(--type-body-strong-weight);
4858+
font-weight: var(--font-medium);
48594859
letter-spacing: 0.01em;
48604860
font-family: var(--font-sans);
48614861
cursor: pointer;
@@ -4895,7 +4895,7 @@ body.is-resizing-panels * {
48954895
border-radius: 18px;
48964896
font-size: var(--type-body-strong-size);
48974897
line-height: var(--type-body-strong-line-height);
4898-
font-weight: var(--type-body-strong-weight);
4898+
font-weight: var(--font-medium);
48994899
box-shadow:
49004900
inset 0 1px 0 rgba(255, 255, 255, 0.18),
49014901
0 14px 32px rgba(37, 99, 235, 0.24);
@@ -5033,7 +5033,7 @@ body.is-resizing-panels * {
50335033
border-radius: var(--radius-md);
50345034
font-family: var(--font-sans);
50355035
font-size: var(--type-body-strong-size);
5036-
font-weight: var(--type-body-strong-weight);
5036+
font-weight: var(--font-medium);
50375037
line-height: var(--type-body-strong-line-height);
50385038
white-space: nowrap;
50395039
transition:
@@ -5097,7 +5097,7 @@ body.is-resizing-panels * {
50975097
padding: 0 var(--sp-2);
50985098
border-radius: var(--radius-sm);
50995099
font-size: var(--type-label-size);
5100-
font-weight: var(--type-label-weight);
5100+
font-weight: var(--font-medium);
51015101
line-height: var(--type-label-line-height);
51025102
}
51035103

@@ -8652,7 +8652,7 @@ textarea.input {
86528652
height: 36px;
86538653
padding: 0 var(--sp-3);
86548654
border: none;
8655-
border-bottom: 1px solid color-mix(in srgb, var(--border) 62%, transparent);
8655+
border-bottom: none;
86568656
border-radius: 0;
86578657
background: color-mix(in srgb, var(--bg-surface) 24%, transparent);
86588658
color: var(--text-primary);
@@ -8804,9 +8804,9 @@ textarea.input {
88048804
min-height: 36px;
88058805
height: 36px;
88068806
padding: 0;
8807-
border: 1px solid color-mix(in srgb, var(--border) 66%, transparent);
8807+
border: none;
88088808
border-radius: 10px;
8809-
background: color-mix(in srgb, var(--bg-surface) 42%, transparent);
8809+
background: transparent;
88108810
color: var(--text-primary);
88118811
transition:
88128812
background-color var(--mobile-shell-motion-surface-duration) var(--ease-out),
@@ -9082,10 +9082,10 @@ textarea.input {
90829082
.mobile-shell__empty-title {
90839083
margin: 0;
90849084
color: var(--text-primary);
9085-
font-size: var(--type-display-size);
9086-
line-height: var(--type-display-line-height);
9087-
font-weight: var(--type-display-weight);
9088-
letter-spacing: var(--type-display-letter-spacing);
9085+
font-size: var(--type-app-title-size);
9086+
line-height: var(--type-app-title-line-height);
9087+
font-weight: var(--type-app-title-weight);
9088+
letter-spacing: var(--type-app-title-letter-spacing);
90899089
}
90909090

90919091
.mobile-shell__placeholder-copy {
@@ -9122,7 +9122,7 @@ textarea.input {
91229122
padding: 0 var(--sp-4);
91239123
font-size: var(--type-body-strong-size);
91249124
line-height: var(--type-body-strong-line-height);
9125-
font-weight: var(--type-body-strong-weight);
9125+
font-weight: var(--font-medium);
91269126
border: 1px solid color-mix(in srgb, var(--accent-blue) 34%, var(--border));
91279127
border-radius: 12px;
91289128
background: color-mix(in srgb, var(--accent-blue) 8%, var(--bg-surface));
@@ -9282,6 +9282,7 @@ textarea.input {
92829282
display: grid;
92839283
grid-template-columns: repeat(3, minmax(0, 1fr));
92849284
gap: var(--sp-2);
9285+
min-height: 36px;
92859286
padding: 0 0 var(--sp-1);
92869287
background: transparent;
92879288
border-top: none;
@@ -9294,9 +9295,10 @@ textarea.input {
92949295
flex-direction: column;
92959296
align-items: center;
92969297
justify-content: center;
9297-
min-height: 30px;
9298+
min-height: 36px;
9299+
height: 36px;
92989300
gap: 4px;
9299-
padding: 2px var(--sp-2) 2px;
9301+
padding: 1px var(--sp-2) 0;
93009302
border: none;
93019303
border-top: 1px solid transparent;
93029304
border-radius: 0;
@@ -10627,7 +10629,7 @@ textarea.input {
1062710629
color: var(--text-primary);
1062810630
font-size: var(--type-body-strong-size);
1062910631
line-height: var(--type-body-strong-line-height);
10630-
font-weight: var(--type-body-strong-weight);
10632+
font-weight: var(--font-medium);
1063110633
transition:
1063210634
background-color var(--mobile-shell-motion-surface-duration) var(--ease-out),
1063310635
border-color var(--mobile-shell-motion-surface-duration) var(--ease-out),
@@ -11855,7 +11857,7 @@ textarea.input {
1185511857
color: #0b1020;
1185611858
font-size: var(--type-body-strong-size);
1185711859
line-height: var(--type-body-strong-line-height);
11858-
font-weight: var(--type-body-strong-weight);
11860+
font-weight: var(--font-medium);
1185911861
}
1186011862

1186111863
.git-commit-primary:disabled {
@@ -12375,7 +12377,7 @@ textarea.input {
1237512377
border-radius: var(--radius-md);
1237612378
font-size: var(--type-body-strong-size);
1237712379
line-height: var(--type-body-strong-line-height);
12378-
font-weight: var(--type-body-strong-weight);
12380+
font-weight: var(--font-medium);
1237912381
cursor: pointer;
1238012382
transition: all var(--duration-fast) var(--ease-out);
1238112383
}

packages/web/src/styles/components.theme.test.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -275,18 +275,14 @@ describe("components.css theme-sensitive surfaces", () => {
275275
expect(getLastRuleBlockFrom(buttonStyles, ".btn")).toContain(
276276
"font-size: var(--type-body-strong-size)"
277277
);
278-
expect(getLastRuleBlockFrom(buttonStyles, ".btn")).toContain(
279-
"font-weight: var(--type-body-strong-weight)"
280-
);
278+
expect(getLastRuleBlockFrom(buttonStyles, ".btn")).toContain("font-weight: var(--font-medium)");
281279
expect(getLastRuleBlockFrom(buttonStyles, ".btn")).toContain(
282280
"line-height: var(--type-body-strong-line-height)"
283281
);
284282
expect(getLastRuleBlockFrom(buttonStyles, ".sm")).toContain(
285283
"font-size: var(--type-label-size)"
286284
);
287-
expect(getLastRuleBlockFrom(buttonStyles, ".sm")).toContain(
288-
"font-weight: var(--type-label-weight)"
289-
);
285+
expect(getLastRuleBlockFrom(buttonStyles, ".sm")).toContain("font-weight: var(--font-medium)");
290286
expect(getLastRuleBlockFrom(buttonStyles, ".lg")).not.toContain("font-size:");
291287

292288
expect(getLastRuleBlockFrom(inputStyles, ".input")).toContain(
@@ -331,7 +327,7 @@ describe("components.css theme-sensitive surfaces", () => {
331327
"font-size:var(--type-body-strong-size)"
332328
);
333329
expect(getLastRuleBlockFrom(runtimeStylesheet, ".btn")).toContain(
334-
"font-weight:var(--type-body-strong-weight)"
330+
"font-weight:var(--font-medium)"
335331
);
336332
expect(getLastRuleBlockFrom(runtimeStylesheet, ".btn-sm")).toContain(
337333
"font-size:var(--type-label-size)"
@@ -792,10 +788,12 @@ describe("components.css theme-sensitive surfaces", () => {
792788

793789
expect(mobileDock).toContain("grid-template-columns: repeat(3, minmax(0, 1fr))");
794790
expect(mobileDock).toContain("gap: var(--sp-2)");
791+
expect(mobileDock).toContain("min-height: 36px");
795792
expect(mobileDockItem).toBeTruthy();
796793
expect(mobileDockItem).toContain("border-top: 1px solid transparent");
797794
expect(mobileDockItem).toContain("background: transparent");
798-
expect(mobileDockItem).toContain("min-height: 30px");
795+
expect(mobileDockItem).toContain("min-height: 36px");
796+
expect(mobileDockItem).toContain("height: 36px");
799797
expect(activeDockItem).toBeTruthy();
800798
expect(activeDockItem).toContain("border-top-color:");
801799
});
@@ -1037,9 +1035,11 @@ describe("components.css theme-sensitive surfaces", () => {
10371035
expect(topbar).toContain(
10381036
"padding: calc(var(--mobile-safe-top) + var(--sp-1)) calc(var(--mobile-safe-right) + var(--sp-4)) var(--sp-1) calc(var(--mobile-safe-left) + var(--sp-4))"
10391037
);
1040-
expect(topbarWorkspaceButton).toContain("border-bottom: 1px solid");
1038+
expect(topbarWorkspaceButton).toContain("border-bottom: none");
10411039
expect(topbarWorkspaceButton).toContain("border-radius: 0");
1040+
expect(topbarIconButton).toContain("border: none");
10421041
expect(topbarIconButton).toContain("border-radius: 10px");
1042+
expect(topbarIconButton).toContain("background: transparent");
10431043
expect(emptyStage).toContain("padding: clamp(34px, 9vh, 72px) var(--sp-4) var(--sp-3)");
10441044
expect(bottomStack).toContain("background: linear-gradient(");
10451045
expect(bottomStack).toContain("border-top: 1px solid color-mix(");
@@ -1049,9 +1049,11 @@ describe("components.css theme-sensitive surfaces", () => {
10491049
);
10501050
expect(dock).toContain("gap: var(--sp-2)");
10511051
expect(dock).toContain("border-bottom: none");
1052+
expect(dock).toContain("min-height: 36px");
10521053
expect(dockItem).toBeTruthy();
1053-
expect(dockItem).toContain("min-height: 30px");
1054-
expect(dockItem).toContain("padding: 2px var(--sp-2) 2px");
1054+
expect(dockItem).toContain("min-height: 36px");
1055+
expect(dockItem).toContain("height: 36px");
1056+
expect(dockItem).toContain("padding: 1px var(--sp-2) 0");
10551057
expect(dockLabel).toContain("font-size: var(--type-kicker-size)");
10561058
expect(statusBar).toContain("padding-bottom: calc(var(--mobile-safe-bottom) + var(--sp-1))");
10571059
expect(statusBar).toContain("border-top: 1px solid");
@@ -1070,7 +1072,7 @@ describe("components.css theme-sensitive surfaces", () => {
10701072
expect(emptyState).toContain("width: 100%");
10711073
expect(emptyState).toContain("text-align: left");
10721074
expect(emptyState).toContain("gap: var(--sp-3)");
1073-
expect(emptyTitle).toContain("font-size: var(--type-display-size)");
1075+
expect(emptyTitle).toContain("font-size: var(--type-app-title-size)");
10741076
expect(placeholderCopy).toContain("gap: var(--sp-2)");
10751077
expect(emptyCta).toContain("min-height: 38px");
10761078
expect(emptyCta).toContain("width: auto");

packages/web/src/styles/tokens-touch.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ describe("tokens.css touch tokens", () => {
108108

109109
expect(root).toContain("--type-kicker-size: var(--font-size-100)");
110110
expect(root).toContain("--type-kicker-line-height: 1.2");
111-
expect(root).toContain("--type-kicker-weight: var(--font-semibold)");
111+
expect(root).toContain("--type-kicker-weight: var(--font-normal)");
112112
expect(root).toContain("--type-kicker-letter-spacing: 0.08em");
113113

114114
expect(root).toContain("--type-label-size: var(--font-size-200)");
115115
expect(root).toContain("--type-label-line-height: 1.35");
116-
expect(root).toContain("--type-label-weight: var(--font-medium)");
116+
expect(root).toContain("--type-label-weight: var(--font-normal)");
117117

118118
expect(root).toContain("--type-meta-size: var(--font-size-200)");
119119
expect(root).toContain("--type-meta-line-height: 1.45");
@@ -123,10 +123,10 @@ describe("tokens.css touch tokens", () => {
123123
expect(root).toContain("--type-body-weight: var(--font-normal)");
124124
expect(root).toContain("--type-body-strong-size: var(--font-size-300)");
125125
expect(root).toContain("--type-body-strong-line-height: 1.45");
126-
expect(root).toContain("--type-body-strong-weight: var(--font-medium)");
126+
expect(root).toContain("--type-body-strong-weight: var(--font-normal)");
127127
expect(root).toContain("--type-code-inline-size: var(--font-size-200)");
128128
expect(root).toContain("--type-code-inline-line-height: 1.4");
129-
expect(root).toContain("--type-code-inline-weight: var(--font-medium)");
129+
expect(root).toContain("--type-code-inline-weight: var(--font-normal)");
130130
expect(root).toContain("--type-code-inline-family: var(--font-mono)");
131131
expect(root).toContain("--type-app-title-size: var(--font-size-400)");
132132
expect(root).toContain("--type-app-title-line-height: 1.25");

packages/web/src/styles/tokens.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@
5050

5151
--type-kicker-size: var(--font-size-100);
5252
--type-kicker-line-height: 1.2;
53-
--type-kicker-weight: var(--font-semibold);
53+
--type-kicker-weight: var(--font-normal);
5454
--type-kicker-letter-spacing: 0.08em;
5555

5656
--type-label-size: var(--font-size-200);
5757
--type-label-line-height: 1.35;
58-
--type-label-weight: var(--font-medium);
58+
--type-label-weight: var(--font-normal);
5959

6060
--type-meta-size: var(--font-size-200);
6161
--type-meta-line-height: 1.45;
@@ -67,11 +67,11 @@
6767

6868
--type-body-strong-size: var(--font-size-300);
6969
--type-body-strong-line-height: 1.45;
70-
--type-body-strong-weight: var(--font-medium);
70+
--type-body-strong-weight: var(--font-normal);
7171

7272
--type-code-inline-size: var(--font-size-200);
7373
--type-code-inline-line-height: 1.4;
74-
--type-code-inline-weight: var(--font-medium);
74+
--type-code-inline-weight: var(--font-normal);
7575
--type-code-inline-family: var(--font-mono);
7676

7777
--type-app-title-size: var(--font-size-400);

0 commit comments

Comments
 (0)