Skip to content

Commit 189a453

Browse files
dchyunZedLi
andauthored
style: πŸ’„ align typography and border styles to HDS tokens (#3051)
* Feat: Convert font-family styles to HDS tokens * Feat: Convert font-size styles to HDS tokens * Feat: Convert font-weight styles to HDS tokens * Feat: Convert border-radius styles to HDS tokens --------- Co-authored-by: Zhihe Li <[email protected]>
1 parent 6fca907 commit 189a453

File tree

14 files changed

+35
-61
lines changed

14 files changed

+35
-61
lines changed

β€Žaddons/rose/app/styles/rose/_typography.scssβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ html {
1414
body {
1515
// Used by Rose::Tabs and '/' in breadcrumbs
1616
// and link list panel
17-
font-family: typography.$family-primary;
17+
font-family: var(--token-typography-font-stack-text);
1818

1919
// this is used across the app
2020
line-height: typography.line-height(m);

β€Žaddons/rose/app/styles/rose/components/code-editor/_index.scssβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
max-width: 100%;
1616
display: flex;
1717
flex: 1;
18-
font-family: ui-monospace, Menlo, monospace;
18+
font-family: var(--token-typography-font-stack-code);
1919
}
2020

2121
.rose-autosize {

β€Žaddons/rose/app/styles/rose/components/form/_checkbox.scssβ€Ž

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828

2929
.rose-form-checkbox-label {
3030
// label styles
31-
@include type.type(s, semibold);
31+
@include type.type(s);
3232

3333
color: currentcolor;
34+
font-weight: var(--token-typography-font-weight-semibold);
3435

3536
&,
3637
.rose-form-checkbox-label-description {
@@ -53,7 +54,7 @@
5354
pointer-events: none;
5455
content: ' ';
5556
border: sizing.rems(xxxxs) solid var(--ui-gray-subtler-2);
56-
border-radius: sizing.rems(xxxs);
57+
border-radius: var(--token-form-checkbox-border-radius);
5758
}
5859

5960
&::after {

β€Žaddons/rose/app/styles/rose/components/form/_fieldset.scssβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
margin-bottom: sizing.rems(m);
1111

1212
.rose-form-fieldset-title {
13-
@include type.type(s, semibold);
13+
@include type.type(s);
14+
15+
font-weight: var(--token-typography-font-weight-semibold);
1416
}
1517

1618
.rose-form-fieldset-body {

β€Žaddons/rose/app/styles/rose/components/form/_select.scssβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
margin-bottom: sizing.rems(xs);
2222
padding: sizing.rems(xs) sizing.rems(xxl) sizing.rems(xs) sizing.rems(xs);
2323
border: sizing.rems(xxxxs) solid var(--ui-gray-subtler-2);
24-
border-radius: sizing.rems(xxxs);
24+
border-radius: var(--token-border-radius-x-small);
2525
box-shadow: 0 sizing.rems(xxs) sizing.rems(xxs)
2626
rgba(var(--stark-components), var(--opacity-2));
2727
background: var(--ui-gray-subtler-5)

β€Žaddons/rose/app/styles/rose/components/header/_brand.scssβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
}
2121

2222
.rose-header-brand-text {
23-
@include type.type(m, normal);
23+
@include type.type(m);
2424

25+
font-weight: var(--token-typography-font-weight-regular);
2526
margin: 0;
2627
margin-left: sizing.rems(s);
2728
white-space: nowrap;

β€Žaddons/rose/app/styles/rose/components/list/_key-value.scssβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
// First cell (key) is approximately 25%
4444
&:nth-child(1) {
4545
width: 25%;
46-
font-weight: typography.font-weight(semibold);
46+
font-weight: var(--token-typography-font-weight-semibold);
4747
}
4848

4949
// Second cell (value) is approximately 75%

β€Žaddons/rose/app/styles/rose/components/nav/_sidebar.scssβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222

2323
// TODO revisit the title
2424
.rose-nav-title {
25-
@include type.type(xs, semibold);
25+
@include type.type(xs);
2626

2727
display: none;
2828
color: #{sass.color(ui-gray, 400)};
29+
font-weight: var(--token-typography-font-weight-semibold);
2930
text-transform: uppercase;
3031

3132
$line-height: math.div(20, 12);

β€Žaddons/rose/app/styles/rose/components/nav/_tabs.scssβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
--background: transparent;
1818
--box-shadow-color: transparent;
1919

20-
@include type.type(s, semibold);
20+
@include type.type(s);
2121

22+
font-weight: var(--token-typography-font-weight-semibold);
2223
display: inline-block;
2324
color: var(--color);
2425
background-color: var(--background);

β€Žaddons/rose/app/styles/rose/utilities/_type.scssβ€Ž

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
* Mixin for specifying a font-size/line-height size on an element, with
1010
* an option for specifying weight.
1111
*/
12-
@mixin type($size, $weight: &) {
12+
@mixin type($size) {
1313
font-size: typography.font-size($size);
1414
line-height: typography.line-height($size);
15-
@if $weight {
16-
font-weight: typography.font-weight($weight);
17-
}
1815
}

0 commit comments

Comments
Β (0)