Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-10535: updated typography variables, added letter spacing #1122

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/css/ckeditor.min.css

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/css/styles.min.css

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions src/scss/01_variables/_typography_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,56 +20,63 @@ $config: deep-map-merge(
h1: (
font-size: remify(40px),
font-weight: $font-weight-regular,
letter-spacing: remify(-0.8px),
line-height: math.div(40, 40), // 1
breakpoint_l: (
font-size: remify(64px),
font-weight: $font-weight-regular,
letter-spacing: remify(-1.2px),
line-height: math.div(64, 64), // 1
)
),
h2: (
font-size: remify(32px),
font-weight: $font-weight-regular,
line-height: math.div(32, 32), // 1
letter-spacing: remify(-0.4px),
line-height: math.div(38, 32), // 1.1875
breakpoint_l: (
font-size: remify(48px),
font-weight: $font-weight-regular,
letter-spacing: remify(-1px),
line-height: math.div(48, 48), // 1
)
),
h3: (
font-size: remify(24px),
font-weight: $font-weight-medium,
letter-spacing: remify(-0.2px),
line-height: math.div(32, 24), // 1.333..
breakpoint_l: (
font-size: remify(32px),
font-weight: $font-weight-regular,
line-height: math.div(32, 32), // 1
letter-spacing: remify(-0.4px),
line-height: math.div(38, 32), // 1.1875
)
),
h4: (
font-size: remify(20px),
font-weight: $font-weight-medium,
line-height: math.div(26, 20), // 1.3
line-height: math.div(30, 20), // 1.5
breakpoint_l: (
font-size: remify(24px),
font-weight: $font-weight-medium,
line-height: math.div(28, 24), // 1.1666..
line-height: math.div(30, 24), // 1.25
)
),
h5: (
font-size: remify(18px),
font-weight: $font-weight-medium,
line-height: math.div(22, 18), // 1.222..
font-weight: $font-weight-bold,
line-height: math.div(28, 18), // 1.555..
breakpoint_l: (
font-size: remify(20px),
font-weight: $font-weight-medium,
font-weight: $font-weight-bold,
line-height: math.div(30, 20), // 1.5
)
),
h6: (
font-size: remify(16px),
font-weight: $font-weight-bold,
letter-spacing: remify(0.2px),
line-height: math.div(24, 16), // 1.5
breakpoint_l: (
font-size: remify(18px),
Expand Down
12 changes: 12 additions & 0 deletions src/scss/02_mixins/_typography_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@
font-weight: get('#{$-path}.font-weight');
line-height: var(--line-height);

@if get-check('#{$-path}.letter-spacing') {
letter-spacing: get('#{$-path}.letter-spacing'); // Conditional letter-spacing
}

@if get-check('#{$-path}.breakpoint_m') {
@include breakpoint($breakpoint-m) {
--line-height: #{get('#{$-path}.breakpoint_m.line-height')};
font-size: get('#{$-path}.breakpoint_m.font-size');
font-weight: get('#{$-path}.breakpoint_m.font-weight');

@if get-check('#{$-path}.breakpoint_m.letter-spacing') {
letter-spacing: get('#{$-path}.breakpoint_m.letter-spacing'); // Conditional for medium breakpoint
}
}
}

Expand All @@ -25,6 +33,10 @@
--line-height: #{get('#{$-path}.breakpoint_l.line-height')};
font-size: get('#{$-path}.breakpoint_l.font-size');
font-weight: get('#{$-path}.breakpoint_l.font-weight');

@if get-check('#{$-path}.breakpoint_l.letter-spacing') {
letter-spacing: get('#{$-path}.breakpoint_l.letter-spacing'); // Conditional for large breakpoint
}
}
}
}
Expand Down
Loading