Skip to content

Commit 3e3c788

Browse files
Fix heading sizes, issues with Firefox (#137)
* Fix heading sizes, issues with Firefox
1 parent 28fb1b2 commit 3e3c788

File tree

8 files changed

+25
-9
lines changed

8 files changed

+25
-9
lines changed

src/app/components/post-item/post-item.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
width: 100%;
3434
padding: 0;
3535
margin-bottom: 8px;
36-
aspect-ratio: 2.5;
36+
aspect-ratio: 2;
3737
}
3838
}

src/app/components/table-of-content/table-of-content.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="container">
2-
<div class="mat-h2">Jump to:</div>
2+
<div class="mat-h5 uppercase">In this article</div>
33

44
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
55
<mat-tree-node

src/app/components/table-of-content/table-of-content.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@
2727
a {
2828
text-decoration: none;
2929
}
30+
31+
.uppercase {
32+
text-transform: uppercase;
33+
}

src/app/features/post/post.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</mat-chip>
1313
</mat-chip-set>
1414
<h1>{{ post.title }}</h1>
15-
<h2>{{ post.excerpt }}</h2>
15+
<h2 class="mat-body-2 lead">{{ post.excerpt }}</h2>
1616
<span class="post__header-info">
1717
@if (post.date) {
1818
{{ post.date | date: 'longDate' }} |

src/app/features/post/post.component.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
@import 'prismjs/themes/prism-tomorrow.css';
44

55
a {
6-
text-decoration-color: var(--blog-palette-accent);
6+
text-decoration-color: var(--backbase-primary);
77
text-decoration-thickness: 3px;
8+
text-underline-offset: .25em;
89
}
910
.post {
1011
&__header {
12+
h2.lead.mat-body-2 {
13+
font-weight: normal;
14+
font-size: 1.25em;
15+
}
16+
1117
margin: 3rem 1rem;
1218
@include responsive.up('lg') {
1319
display: flex;
@@ -69,6 +75,7 @@ a {
6975

7076
&__content {
7177
display: flex;
78+
overflow-x: hidden;
7279

7380
.markdown-container {
7481
max-width: 100%;
@@ -77,7 +84,6 @@ a {
7784
@include responsive.up('lg') {
7885
flex-direction: row-reverse;
7986
justify-content: space-between;
80-
flex-grow: 2;
8187
}
8288
}
8389

styles/_theme.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@
7070
--blog-palette-muted: #{$text-muted};
7171
--mat-paginator-container-background-color: #{$background-color};
7272
--mdc-elevated-card-container-color: #{$background-color};
73+
--backbase-primary: #{map-get(default-palette.$backbase-primary-light, 500)};
7374
}

styles/_typography.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
$backbase-typography: mat.define-typography-config(
44
$font-family: 'Libre Franklin',
5-
$headline-5: mat.define-typography-level(3.5em, 1, 700),
6-
$subtitle-1: mat.define-typography-level(1.2em, 1, 700),
7-
$subtitle-2: mat.define-typography-level(1em, 1, 700),
8-
$body-2: mat.define-typography-level(1rem, 1.5, 400),
5+
$headline-5: mat.define-typography-level(3.5em, 1, 700), /* h1 */
6+
$headline-6: mat.define-typography-level(1.5em, 2, 700), /* h2 */
7+
$subtitle-1: mat.define-typography-level(1.2em, 2, 700), /* h3 */
8+
$body-1: mat.define-typography-level(1em, 2, 700), /* h4 */
9+
$body-2: mat.define-typography-level(1rem, 1.5, 400), /* body text */
910
);

styles/styles.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666
@each $size, $width in $breakpoints {
6767
--blog-breakpoint-#{$size}: #{$width};
6868
}
69+
70+
.mat-typography p {
71+
margin-bottom: 1.5em;
72+
}
6973
}
7074

7175
html,

0 commit comments

Comments
 (0)