Skip to content

Commit c9bd0f6

Browse files
chore(typography): update typography to SHINE styles (#2028)
* chore(typography): update type sizes; rm .fs-category * add changeset * Update font weight classes * Address review * build(deps-dev): bump stylelint from 16.24.0 to 16.25.0 (#2032) Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.24.0 to 16.25.0. - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](stylelint/stylelint@16.24.0...16.25.0) --- updated-dependencies: - dependency-name: stylelint dependency-version: 16.25.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix prettier-induced semicolon psychosis * Update responsive type sizes * Update visual regression images --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent ec204dc commit c9bd0f6

File tree

9,038 files changed

+18141
-18169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,038 files changed

+18141
-18169
lines changed

.changeset/giant-suns-look.md

Lines changed: 5 additions & 0 deletions

MIGRATION_GUIDE.md

Lines changed: 3 additions & 0 deletions

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"sass": "^1.93.2",
8484
"sinon": "^20.0.0",
8585
"storybook": "^9.1.5",
86-
"stylelint": "^16.21.1",
86+
"stylelint": "^16.25.0",
8787
"stylelint-config-recommended": "^16.0.0",
8888
"stylelint-config-standard": "^38.0.0",
8989
"svelte": "^5.39.11",

packages/stacks-classic/lib/atomic/typography.less

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,36 +37,22 @@ p {
3737
.fs-body3 { font-size: var(--fs-body3) !important; }
3838
.fs-body2 { font-size: var(--fs-body2) !important; }
3939
.fs-body1 { font-size: var(--fs-body1) !important; }
40-
41-
.fs-caption,
42-
.fs-category { font-size: var(--fs-caption) !important; }
40+
.fs-caption { font-size: var(--fs-caption) !important; }
4341
.fs-fine { font-size: var(--fs-fine) !important; }
4442

4543
#stacks-internals #screen-sm({
46-
.fs-display4 { font-size: 3.8rem !important; }
47-
.fs-display3 { font-size: 3.3rem !important; }
48-
.fs-display2 { font-size: 3rem !important; }
49-
.fs-display1 { font-size: 2.6rem !important; }
50-
.fs-headline2 { font-size: 2.3rem !important; }
51-
.fs-headline1 { font-size: 2rem !important; }
52-
.fs-title { font-size: 1.8rem !important; }
53-
.fs-subheading { font-size: 1.6rem !important; }
54-
.fs-body3 { font-size: 1.4rem !important; }
55-
.fs-body2 { font-size: 1.3rem !important; }
44+
.fs-display4 { font-size: calc(var(--fs-display4) * .43) !important; } // 43px
45+
.fs-display3 { font-size: calc(var(--fs-display3) * .5139) !important; } // ~37px
46+
.fs-display2 { font-size: calc(var(--fs-display2) * .5862) !important; } // ~34px
47+
.fs-display1 { font-size: calc(var(--fs-display1) * .6304) !important; } // ~29px
48+
.fs-headline2 { font-size: calc(var(--fs-headline2) * .7224) !important; } // ~26px
49+
.fs-headline1 { font-size: calc(var(--fs-headline1) * .8215) !important; } // ~23px
50+
.fs-title { font-size: calc(var(--fs-title) * .9094) !important; } // ~20px
51+
.fs-subheading { font-size: calc(var(--fs-subheading) * .8998) !important; } // ~18px
52+
.fs-body3 { font-size: calc(var(--fs-body3) * .8888) !important; } // ~16px
53+
.fs-body2 { font-size: calc(var(--fs-body2) * .9374) !important; } // ~15px
5654
}, @force-selector: true);
5755

58-
.fs-category {
59-
font-weight: 700;
60-
text-transform: uppercase;
61-
62-
// If a top border is desired
63-
&.has-border {
64-
width: 100%;
65-
padding: var(--su4) 0;
66-
border-top: var(--su-static1) solid var(--bc-medium);
67-
}
68-
}
69-
7056
// ============================================================================
7157
// $ LINE HEIGHTS
7258
// ----------------------------------------------------------------------------
@@ -89,7 +75,8 @@ p {
8975

9076
// -- Font Weight
9177
.fw-normal { font-weight: 400 !important; }
92-
.fw-bold { font-weight: 700 !important; }
78+
.fw-medium { font-weight: 500 !important; }
79+
.fw-bold { font-weight: 600 !important; }
9380

9481
// -- Font Styles
9582
.fs-normal { font-style: normal !important; }

packages/stacks-classic/lib/base/body.less

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ body {
2424
line-height: var(--lh-base);
2525
}
2626

27-
#stacks-internals #screen-sm({
28-
&,
29-
body {
30-
font-size: 11px;
31-
}
32-
}, @force-selector: true);
33-
3427
body {
3528
box-sizing: border-box;
3629
min-height: 100%;
@@ -41,4 +34,6 @@ body {
4134
*:after {
4235
box-sizing: inherit;
4336
}
37+
38+
// TODO SHINE set max width here
4439
}

packages/stacks-classic/lib/exports/constants-type.less

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,44 +99,44 @@ body {
9999
// $ FONT SIZES (fs-)
100100
// Base font-size is 13px.
101101
// ----------------------------------------------------------------------------
102-
--fs-fine: 11px;
103-
--fs-caption: 12px;
104-
--fs-body1: 13px;
102+
--fs-fine: 12px;
103+
--fs-caption: 13px;
104+
--fs-body1: 14px;
105105

106106
// Relative to the root element
107-
--fs-body2: 1.153846154rem;
108-
--fs-body3: 1.307692308rem;
109-
--fs-subheading: 1.461538462rem;
110-
--fs-title: 1.615384615rem;
111-
--fs-headline1: 2.076923077rem;
112-
--fs-headline2: 2.615384615rem;
113-
--fs-display1: 3.307692308rem;
114-
--fs-display2: 4.230769231rem;
115-
--fs-display3: 5.307692308rem;
116-
--fs-display4: 7.615384615rem;
107+
--fs-body2: 1.143rem; // 16px
108+
--fs-body3: 1.286rem; // 18px
109+
--fs-subheading: 1.429rem; // 20px
110+
--fs-title: 1.571rem; // 22px
111+
--fs-headline1: 2rem; // 28px
112+
--fs-headline2: 2.571rem; // 36px
113+
--fs-display1: 3.286rem; // 46px
114+
--fs-display2: 4.143rem; // 58px
115+
--fs-display3: 5.143rem; // 72px
116+
--fs-display4: 7.143rem; // 100px
117117

118118
// Relative to the parent
119-
--fs-body2-relative: 1.153846154em;
120-
--fs-body3-relative: 1.307692308em;
121-
--fs-subheading-relative: 1.461538462em;
122-
--fs-title-relative: 1.615384615em;
123-
--fs-headline1-relative: 2.076923077em;
124-
--fs-headline2-relative: 2.615384615em;
125-
--fs-display1-relative: 3.307692308em;
126-
--fs-display2-relative: 4.230769231em;
127-
--fs-display3-relative: 5.307692308em;
128-
--fs-display4-relative: 7.615384615em;
119+
--fs-body2-relative: 1.143rem; // 16px
120+
--fs-body3-relative: 1.286rem; // 18px
121+
--fs-subheading-relative: 1.429rem; // 20px
122+
--fs-title-relative: 1.571rem; // 22px
123+
--fs-headline1-relative: 2rem; // 28px
124+
--fs-headline2-relative: 2.571rem; // 36px
125+
--fs-display1-relative: 3.286rem; // 46px
126+
--fs-display2-relative: 4.143rem; // 58px
127+
--fs-display3-relative: 5.143rem; // 72px
128+
--fs-display4-relative: 7.143rem; // 100px
129129

130130
// this value is not using spacing units because the calc involved results
131131
// in unexpected sizing. I'm not sure why, honestly.
132-
--fs-base: 13px;
132+
--fs-base: 14px;
133133

134134
// ============================================================================
135135
// $ LINE HEIGHT (lh-)
136136
// ----------------------------------------------------------------------------
137137
// Need to remove the unit off the font-size to make line-height unitless
138138
// FIXME this shouldn't be public. Find a way to use unitless `--fs-base`.
139-
--stacks-internals-lh-unit: 13;
139+
--stacks-internals-lh-unit: 14;
140140

141141
// Now the various line-height variables
142142
--lh-xs: 1;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:bb28be2199a482952f93568a16bdf71c503cc2fa41934a183ff512f4530e1396
3-
size 1465
2+
oid sha256:568816f5c155ab3d198f81355a8c19e24c42f5117d8aeabf05a3e2dce85e86c4
3+
size 1545
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:25c8ef4633eb10a66566d7cde9fcebe57a01a0f64f45dd73d6b95aee0cd7b974
3-
size 1322
2+
oid sha256:3e42fc0037eaf78a2c9057a902a23b19678a77a3d4ebb998d3428feeab198c57
3+
size 1445
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:1343d34f1abcd944a847c3ed7b76a0d63f3e772dc007419755a931551e423134
3-
size 1384
2+
oid sha256:4fafac0f688d8d9175803097f1b49fb6eb4772a76ff807fa97539be8b58e4ea7
3+
size 1474

0 commit comments

Comments
 (0)