Skip to content

Commit e4464e8

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(ui): adopt exact shared 18px typography token
1 parent 3f26f1f commit e4464e8

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎.claude/rules/sim-settings-pages.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Settings pages never use a literal `text-[Npx]` class — always the named Tailw
117117
scale token from the `@theme` block in `apps/sim/app/_styles/globals.css` (`text-micro`
118118
10px, `text-xs` 11px, `text-caption` 12px, `text-small` 13px, `text-sm` 14px
119119
[Tailwind default, unmodified], `text-base` 15px, `text-md` 16px, `text-lg` 18px
120-
[Tailwind default]). A literal size is either a straight rename to the equivalent
120+
[the exact Tailwind default adopted in globals.css]). A literal size is either a straight rename to the equivalent
121121
token (if the pixel value matches one exactly) or a sign the page never migrated —
122122
grep `text-\[1[0-8]px\]` under `apps/sim/app/workspace/*/settings/**` and
123123
`apps/sim/ee/**` to find stragglers.

‎.claude/rules/sim-styling.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ setWidth: (width) => {
4747

4848
## Text Scale
4949

50-
Use the named scale in `apps/sim/app/_styles/globals.css`: `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px, `text-md`=16px, `text-title`=28px, `text-title-lg`=32px, and `text-display`=40px. The explicitly adopted stock entries retain their rem units and default leading: `text-sm`=0.875rem, `text-xl`=1.25rem, and `text-2xl`=1.5rem (14/20/24px at the default root size). Field titles use `text-small`; hints/errors use `text-caption`; workflow titles use `text-md`.
50+
Use the named scale in `apps/sim/app/_styles/globals.css`: `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px, `text-md`=16px, `text-title`=28px, `text-title-lg`=32px, and `text-display`=40px. The explicitly adopted stock entries retain their rem units and default leading: `text-sm`=0.875rem, `text-lg`=1.125rem, `text-xl`=1.25rem, and `text-2xl`=1.5rem (14/18/20/24px at the default root size). Field titles use `text-small`; hints/errors use `text-caption`; workflow titles use `text-md`.
5151

5252
Preserve explicit line heights when replacing arbitrary sizes. Where the old size inherited its line height, use `leading-[inherit]` if the named utility would otherwise add a different default. Keep document-relative heading/code recipes and the thinking loader's proportional label sizing distinct from ordinary UI text.
5353

‎.cursor/rules/sim-settings-pages.mdc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Settings pages never use a literal `text-[Npx]` class — always the named Tailw
114114
scale token from the `@theme` block in `apps/sim/app/_styles/globals.css` (`text-micro`
115115
10px, `text-xs` 11px, `text-caption` 12px, `text-small` 13px, `text-sm` 14px
116116
[Tailwind default, unmodified], `text-base` 15px, `text-md` 16px, `text-lg` 18px
117-
[Tailwind default]). A literal size is either a straight rename to the equivalent
117+
[the exact Tailwind default adopted in globals.css]). A literal size is either a straight rename to the equivalent
118118
token (if the pixel value matches one exactly) or a sign the page never migrated —
119119
grep `text-\[1[0-8]px\]` under `apps/sim/app/workspace/*/settings/**` and
120120
`apps/sim/ee/**` to find stragglers.

‎.cursor/rules/sim-styling.mdc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ setWidth: (width) => {
4747

4848
## Text Scale
4949

50-
Use the named scale in `apps/sim/app/_styles/globals.css`: `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px, `text-md`=16px, `text-title`=28px, `text-title-lg`=32px, and `text-display`=40px. The explicitly adopted stock entries retain their rem units and default leading: `text-sm`=0.875rem, `text-xl`=1.25rem, and `text-2xl`=1.5rem (14/20/24px at the default root size). Field titles use `text-small`; hints/errors use `text-caption`; workflow titles use `text-md`.
50+
Use the named scale in `apps/sim/app/_styles/globals.css`: `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px, `text-md`=16px, `text-title`=28px, `text-title-lg`=32px, and `text-display`=40px. The explicitly adopted stock entries retain their rem units and default leading: `text-sm`=0.875rem, `text-lg`=1.125rem, `text-xl`=1.25rem, and `text-2xl`=1.5rem (14/18/20/24px at the default root size). Field titles use `text-small`; hints/errors use `text-caption`; workflow titles use `text-md`.
5151

5252
Preserve explicit line heights when replacing arbitrary sizes. Where the old size inherited its line height, use `leading-[inherit]` if the named utility would otherwise add a different default. Keep document-relative heading/code recipes and the thinking loader's proportional label sizing distinct from ordinary UI text.
5353

‎apps/sim/app/_styles/globals.css‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@
110110
--text-sm--line-height: calc(1.25 / 0.875);
111111
--text-base: 15px;
112112
--text-md: 16px;
113+
--text-lg: 1.125rem;
114+
--text-lg--line-height: calc(1.75 / 1.125);
113115
--text-xl: 1.25rem;
114116
--text-xl--line-height: calc(1.75 / 1.25);
115117
--text-2xl: 1.5rem;

0 commit comments

Comments
 (0)