Skip to content

Commit a29af2a

Browse files
committed
Improved global styles, vertical rhythm and typography
1 parent f4bd3dd commit a29af2a

File tree

6 files changed

+79
-48
lines changed

6 files changed

+79
-48
lines changed

_sass/base/_base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ html {
1414
body {
1515
color: $black;
1616
position: relative;
17-
line-height: 1.4;
17+
line-height: 1.5;
1818
font-family: $text-font-stack;
1919
}
2020

_sass/base/_typography.scss

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
h2, h3, h4 {
2-
text-transform: capitalize;
32
position: relative;
3+
margin-top: 0;
44

55
@include respond-to("large") {
66
&:hover .header-link,
@@ -24,6 +24,19 @@ table, img,
2424

2525
h2 {
2626
margin-bottom: 1em;
27+
text-transform: uppercase;
28+
margin-top: 3em;
29+
color: $blue;
30+
31+
a {
32+
color: $blue;
33+
}
34+
}
35+
36+
h3 {
37+
font-size: 1.2em;
38+
margin-bottom: 1.25em;
39+
color: mix($black, white, 80%);
2740
}
2841

2942
p {
@@ -37,26 +50,34 @@ ul, ol {
3750
}
3851

3952
li {
40-
line-height: 1.4;
53+
margin-bottom: .5em;
4154
}
4255

4356
.header-link {
4457
position: absolute;
4558
top: 0;
4659
right: 101%;
4760
transition: .15s;
61+
color: $pink;
4862

4963
@include respond-to("large") {
5064
opacity: 0;
5165
}
5266
}
5367

54-
body:not(.home) h2 {
55-
color: $blue;
56-
text-transform: uppercase;
57-
margin-top: 3em;
68+
.main ul > li:not([class]) {
69+
position: relative;
70+
padding-left: 1.5em;
71+
list-style: none;
5872

59-
a {
60-
color: $blue;
73+
&::before {
74+
content: '';
75+
position: absolute;
76+
left: 0;
77+
width: .4em;
78+
height: .4em;
79+
border-radius: 50%;
80+
top: .6em;
81+
background: $blue;
6182
}
62-
}
83+
}

_sass/pages/_theme-picker.scss

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
&.active {
4141
box-shadow: 0 0 0 .25em rgba($pink, .5);
4242
}
43+
44+
img {
45+
margin-bottom: 0;
46+
}
4347
}
4448

4549
.theme-picker__preview {
@@ -65,20 +69,20 @@
6569
}
6670

6771
.metadata__list {
72+
width: 100%;
73+
height: 100%;
6874
list-style: none;
6975
padding: .5em;
7076
font-size: 1.2em;
7177
position: absolute;
7278
top: 50%;
7379
left: 50%;
80+
margin: 0;
7481
transform: translate(-50%, -50%);
7582
}
7683

7784
.metadata__item {
7885
height: 33.33%;
79-
text-overflow: ellipsis;
80-
overflow: hidden;
81-
white-space: nowrap;
8286
text-align: center;
8387

8488
a {

_sass/partials/_header.scss

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,26 @@
5454
text-decoration: none;
5555
}
5656

57-
&::after {
58-
content: '';
59-
opacity: 0;
60-
transition: .15s ease-out;
61-
position: absolute;
62-
width: 0;
63-
height: 0;
64-
bottom: -2em;
65-
border-left: .6em solid transparent;
66-
border-right: .6em solid transparent;
67-
border-bottom: .75em solid $pink;
68-
left: 50%;
69-
margin-left: -.3em;
70-
}
71-
72-
&:hover::after {
73-
opacity: 1;
74-
bottom: -1.2em;
57+
@include respond-to("large") {
58+
&::after {
59+
content: '';
60+
opacity: 0;
61+
transition: .15s ease-out;
62+
position: absolute;
63+
width: 0;
64+
height: 0;
65+
bottom: -2em;
66+
border-left: .6em solid transparent;
67+
border-right: .6em solid transparent;
68+
border-bottom: .75em solid $pink;
69+
left: 50%;
70+
margin-left: -.3em;
71+
}
72+
73+
&:hover::after {
74+
opacity: 1;
75+
bottom: -1.2em;
76+
}
7577
}
7678
}
7779

_sass/partials/_sidebar.scss

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
padding-top: 1em;
1616

1717
@include respond-to("large") {
18-
padding-top: 0;
18+
padding-top: 2em;
1919
}
2020
}
2121

@@ -28,33 +28,37 @@
2828
color: $yellow !important;
2929

3030
@include respond-to("large") {
31-
margin-bottom: 1em;
32-
margin-top: 2em;
3331
border: none;
3432
padding: 0;
33+
margin-bottom: 1em;
3534
}
3635
}
3736

3837
.sidebar__list {
3938
list-style: none;
4039
padding-left: 0;
4140
font-size: .9em;
42-
line-height: 1.5;
43-
margin: 0;
4441
padding-bottom: 1.5em;
4542
border-bottom: .25em solid $yellow;
43+
margin: 0;
4644

4745
@include respond-to("large") {
48-
margin-bottom: 1em;
46+
margin-bottom: 1.5em;
4947
}
5048
}
5149

5250
.sidebar__list-item {
5351
border-bottom: 1px solid rgba(black, .1);
5452
position: relative;
53+
margin-bottom: 0;
5554

5655
@include respond-to("large") {
5756
border: none;
57+
margin-bottom: .5em;
58+
59+
&:last-of-type {
60+
margin-bottom: 0;
61+
}
5862
}
5963

6064
&.active::after {
@@ -90,7 +94,7 @@
9094
}
9195

9296
@include respond-to("large") {
93-
padding: .25em 0;
97+
padding: 0;
9498
}
9599
}
96100

_sass/vendor/_pygments.scss

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.highlight {
2-
background: $black;
2+
background: mix($blue, $black, 80%);
33
font-family: $code-font-stack;
44
overflow: auto;
5-
border-left: .5em solid #666;
5+
border-left: .5em solid $black;
66
font-size: .9em;
77

88
pre {
9-
padding: .5em 1em;
9+
padding: 1em;
1010
margin: 0;
1111
}
1212

@@ -34,7 +34,7 @@
3434
}
3535

3636
.highlight .c {
37-
color: #75715e;
37+
color: mix($black, white, 40%);
3838
}
3939

4040
.highlight .err {
@@ -55,11 +55,11 @@
5555
}
5656

5757
.highlight .o {
58-
color: #f92672;
58+
color: white;
5959
}
6060

6161
.highlight .p {
62-
color: #f8f8f2;
62+
color: white;
6363
}
6464

6565
.highlight .c1,
@@ -79,7 +79,7 @@
7979

8080
.highlight .kc,
8181
.highlight .kd {
82-
color: #66d9ef;
82+
color: mix($blue, white, 30%);
8383
}
8484

8585
.highlight .kn {
@@ -139,7 +139,7 @@
139139
}
140140

141141
.highlight .nx {
142-
color: #a6e22e;
142+
color: $pink;
143143
}
144144

145145
.highlight .py {
@@ -148,7 +148,7 @@
148148

149149
.highlight .nt,
150150
.l-Scalar-Plain {
151-
color: #f92672;
151+
color: $pink;
152152
}
153153

154154
.highlight .nv {
@@ -174,7 +174,7 @@
174174
.highlight .sb,
175175
.highlight .sc,
176176
.highlight .sd {
177-
color: #e6db74;
177+
color: $yellow;
178178
}
179179

180180
.highlight .se {

0 commit comments

Comments
 (0)