Skip to content

Commit 5475751

Browse files
committed
removed page header indentation
The indentation looked random (and changed rather randomly with screen size). Page layout width calculations seem pretty buggy at this point.
1 parent 6634199 commit 5475751

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

docs/_sass/main.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ a {
6060
}
6161
}
6262

63-
header > div, main > section > div {
64-
max-width: $content-width;
63+
header > div, main > section > div
64+
{
65+
max-width: calc(#{$content-width} + #{$nav-width} + 20px + #{$toc-width} + 20px - 46px - 64px); /* formula from ressources main > section.resources-section > div -64px (trial&error) */
6566
}
6667

6768
h1, h2, h3, h4, h5 {
@@ -142,7 +143,7 @@ main {
142143

143144
& > div {
144145
padding: 80px 40px;
145-
width: 100%;
146+
width: 100%;
146147
box-sizing: border-box;
147148

148149
& > h2 {

docs/_sass/resources.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ main > section.resources-section {
2121
padding-right: 16px;
2222
display: flex;
2323
align-items: flex-start;
24-
max-width: calc(#{$content-width} + 240px + 320px - 46px); /* nav bar + toc bar - padding */
24+
max-width: calc(#{$content-width} + #{$nav-width} + 20px + #{$toc-width} + 20px - 46px); /* content-width + nav-width(240px) + toc-width(320px) - padding(46px?) */
2525

2626
& > nav {
2727
position: sticky;
2828
top: 100px;
29-
min-width: 220px;
30-
max-width: 220px;
29+
min-width: $nav-width;
30+
max-width: $nav-width;
3131
background-color: $light-grey-background-color;
3232
border-radius: 6px;
3333
font-size: 0.9em;

docs/_sass/variables.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ $blockquote-line-color: #003357;
5454
$line-height: 1.65;
5555
$content-width: 1170px;
5656
$header-height: 80px;
57+
$nav-width: 220px;
58+
$toc-width: 300px;
5759

5860
$shadow: 0 2px 4px rgba(0,0,0,0.1);
5961
$shadow-top: 0 -2px 4px rgba(0,0,0,0.1);

0 commit comments

Comments
 (0)