Skip to content

Commit 1998fba

Browse files
committed
feat: Add new spacer "large2" equals 4x "small"
Add the "large2" spacer for "in article" elements such as headings, tables, figures, block quotes and syntax highlighted code blocks to make the gap slightly larger than the normal gap between paragraphs. This gap makes the elements visually separate from the text paragraphs. Other minor related changes: * Remove margin top for h1 print. * Remove padding for headings as the gap between the text and border is big enough. Keep the padding for "post-title". * Use larger font for site header navbar. * Remove site header toolbar styles as this is not used anymore.
1 parent f587148 commit 1998fba

File tree

6 files changed

+22
-28
lines changed

6 files changed

+22
-28
lines changed

assets/styles/_footer.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.site-footer {
2-
margin-top: $spacer-normal;
2+
margin-top: $spacer-large2;
33
border-top: $spacer-1 solid;
44

55
@include themed {

assets/styles/_header.scss

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
.site-header {
2-
@media print {
3-
display: none;
4-
}
5-
}
6-
71
.gitinfo,
82
.breadcrumbs {
93
font-size: $font-size-smaller;
@@ -13,7 +7,6 @@
137
.breadcrumbs {
148
width: fit-content;
159
border-bottom: $spacer-1 solid;
16-
margin-top: $spacer-large;
1710

1811
@include themed {
1912
border-color: t($accent);
@@ -36,19 +29,6 @@
3629
}
3730
}
3831

39-
.toolbar {
40-
display: flex;
41-
flex-flow: row wrap;
42-
align-items: flex-start;
43-
justify-content: flex-start;
44-
margin: $spacer-normal 0;
45-
46-
.item {
47-
padding: $spacer-smallest $spacer-small;
48-
margin-right: $spacer-small;
49-
}
50-
}
51-
5232
.theme-toggle {
5333
cursor: pointer;
5434
padding: 0;
@@ -100,3 +80,14 @@
10080
}
10181
}
10282
}
83+
84+
.site-header {
85+
.navbar {
86+
margin-bottom: $spacer-large2;
87+
font-size: $font-size-larger;
88+
}
89+
90+
@media print {
91+
display: none;
92+
}
93+
}

assets/styles/_main.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ h1 {
7878
border-bottom: $spacer-2 dotted;
7979

8080
@media print, ($phone) {
81+
margin-top: 0;
8182
font-size: $font-size * 2;
8283
}
8384
}
@@ -100,8 +101,7 @@ h5,
100101
h6 {
101102
font-family: $font-family-title;
102103
font-weight: bold;
103-
margin: $spacer-normal 0;
104-
padding: $spacer-smallest 0;
104+
margin: $spacer-large2 0 $spacer-normal 0;
105105
width: fit-content;
106106

107107
@media print {
@@ -181,7 +181,7 @@ img {
181181
figure {
182182
display: table;
183183
max-width: 100%;
184-
margin: $spacer-normal 0;
184+
margin: $spacer-large 0;
185185

186186
&.left {
187187
margin-right: auto;
@@ -223,7 +223,7 @@ figure {
223223

224224
blockquote {
225225
border-left: $spacer-smallest solid;
226-
margin: $spacer-largest 0;
226+
margin: $spacer-large 0;
227227
padding: $spacer-normal $spacer-normal $spacer-normal $spacer-large;
228228
font-style: italic;
229229

@@ -262,7 +262,7 @@ table {
262262
table-layout: auto;
263263
border-collapse: collapse;
264264
width: 100%;
265-
margin: $spacer-normal 0;
265+
margin: $spacer-large 0;
266266
}
267267

268268
table,

assets/styles/_post.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
position: relative;
4040
border-bottom: $border-title;
4141
width: 100%;
42+
padding: $spacer-smallest 0;
4243

4344
@include themed {
4445
border-color: t($accent);
@@ -119,6 +120,7 @@
119120
@media print {
120121
display: none;
121122
}
123+
margin: $spacer-largest 0;
122124
}
123125

124126
&-support {

assets/styles/_syntax.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* syntax highlighted code layout */
22
div.highlight-wrapper {
3-
margin: $spacer-normal 0;
3+
margin: $spacer-large 0;
44
border-radius: $spacer-2;
55
border: $spacer-1 solid;
66

assets/styles/_variables.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ $spacer-smallest: $spacer-2 * 2;
1717
$spacer-small: $spacer-smallest * 2;
1818
$spacer-normal: $spacer-small * 2;
1919
$spacer-large: $spacer-small * 3;
20-
$spacer-largest: $spacer-normal * 3;
20+
$spacer-large2: $spacer-small * 4;
21+
$spacer-largest: $spacer-small * 6;
2122

2223
/* Colors */
2324
$blue: hsl(

0 commit comments

Comments
 (0)