Skip to content

Commit

Permalink
chore: foundations typography heading h1 h6 (#3534)
Browse files Browse the repository at this point in the history
Co-authored-by: karimim <[email protected]>
Co-authored-by: Philipp Gfeller <[email protected]>
Co-authored-by: Alizé Debray <[email protected]>
  • Loading branch information
4 people authored Sep 30, 2024
1 parent d6033c5 commit 5c4bbcd
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 144 deletions.
6 changes: 6 additions & 0 deletions .changeset/eleven-keys-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@swisspost/design-system-documentation': patch
'@swisspost/design-system-styles': patch
---

Updated the style of headings (h1-h6).
1 change: 1 addition & 0 deletions packages/styles/src/elements/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@use 'reset';
@use 'body';
@use 'heading';
62 changes: 62 additions & 0 deletions packages/styles/src/elements/heading.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@use '../functions/tokens';
@use '../tokens/elements';

tokens.$default-map: elements.$post-heading;

h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
line-height: tokens.get('post-heading', 'line-height');
font-weight: tokens.get('post-heading', 'font-weight');
}

h1,
.h1 {
font-size: tokens.get('post-h1', 'font-size');
margin-block-start: tokens.get('post-h1', 'margin-block-start');
margin-block-end: tokens.get('post-h1', 'margin-block-end');
}

h2,
.h2 {
font-size: tokens.get('post-h2', 'font-size');
margin-block-start: tokens.get('post-h2', 'margin-block-start');
margin-block-end: tokens.get('post-h2', 'margin-block-end');
}

h3,
.h3 {
font-size: tokens.get('post-h3', 'font-size');
margin-block-start: tokens.get('post-h3', 'margin-block-start');
margin-block-end: tokens.get('post-h3', 'margin-block-end');
}

h4,
.h4 {
font-size: tokens.get('post-h4', 'font-size');
margin-block-start: tokens.get('post-h4', 'margin-block-start');
margin-block-end: tokens.get('post-h4', 'margin-block-end');
}

h5,
.h5 {
font-size: tokens.get('post-h5', 'font-size');
margin-block-start: tokens.get('post-h5', 'margin-block-start');
margin-block-end: tokens.get('post-h5', 'margin-block-end');
}

h6,
.h6 {
font-size: tokens.get('post-h6', 'font-size');
margin-block-start: tokens.get('post-h6', 'margin-block-start');
margin-block-end: tokens.get('post-h6', 'margin-block-end');
}
89 changes: 0 additions & 89 deletions packages/styles/src/layouts/portal/_type.scss

This file was deleted.

3 changes: 0 additions & 3 deletions packages/styles/src/layouts/portal/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
@use './grid';
@use './subnavigation';
@use './type';

@include type.styles;
51 changes: 0 additions & 51 deletions packages/styles/src/variables/_heading.scss

This file was deleted.

1 change: 0 additions & 1 deletion packages/styles/src/variables/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
@forward 'commons';
@forward 'elevation';
@forward 'grid';
@forward 'heading';
@forward 'icons';
@forward 'options';
@forward 'spacing';
Expand Down

0 comments on commit 5c4bbcd

Please sign in to comment.