Skip to content

Commit 6f67e07

Browse files
More responsive font sizing
1 parent 10262f3 commit 6f67e07

File tree

3 files changed

+39
-29
lines changed

3 files changed

+39
-29
lines changed

assets/main.css

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ body {
1111
}
1212

1313
main {
14-
margin: 0 .5rem;
15-
font-size: 1.2rem;
14+
margin: 0 .5em;
15+
font-size: 1.2em;
1616
}
1717

1818
h1 {
1919
font-style: italic;
2020
text-align:center;
21-
font-size: 3rem;
21+
font-size: 3em;
2222
margin-bottom: 0;
2323
}
2424

2525
h2 {
2626
font-style: italic;
2727
text-align:center;
28-
font-size: 1.5rem;
28+
font-size: 1.5em;
2929
margin-left: 5%;
3030
margin-right: 5%;
3131
}
@@ -42,7 +42,6 @@ li {
4242
}
4343

4444
.code {
45-
margin-left: 1.5rem;
4645
display: block;
4746
}
4847

@@ -51,36 +50,47 @@ pre {
5150
}
5251

5352
code {
54-
font-family: monospace;
55-
font-size: 1rem;
53+
font-family: "Ubuntu Mono", monospace;
5654
background-color: #eeeeee;
5755
}
5856

5957
pre code {
60-
font-size: 1.25rem;
6158
color: #333333;
6259
background-color: #ffffff;
6360
margin-bottom: 0;
6461
}
6562

6663
@media (min-width: 850px) {
67-
main {
68-
max-width: 70%;
69-
margin: auto;
70-
}
71-
h1 {
72-
font-size: 5rem;
73-
}
74-
h2 {
75-
font-size: 2rem;
76-
}
77-
code {
78-
font-size: 1.2rem;
79-
}
80-
pre code {
81-
font-size: 1.6rem;
82-
}
83-
.code {
84-
margin-left: 5rem;
85-
}
64+
main {
65+
max-width: 850px;
66+
margin: auto;
67+
}
68+
h1 {
69+
font-size: 5em;
70+
}
71+
h2 {
72+
font-size: 2em;
73+
}
74+
code {
75+
font-size: 1.2em;
76+
}
77+
pre code {
78+
font-size: 1.2em;
79+
}
80+
.code {
81+
margin-left: 5em;
82+
}
83+
}
84+
85+
@media (max-width: 850px) {
86+
h1 {
87+
font-size: 3em;
88+
}
89+
h2 {
90+
font-size: 1.2em;
91+
}
92+
.code {
93+
font-size: 3.5vw;
94+
margin-left: 1.5em;
95+
}
8696
}

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h2 id="readable-and-concise-concatenative-programming">Readable and concise con
2323
<span style='color: #a71d5d'>If</span> <span style='color: #795da3'>Multiple</span> <span style='color: #333333'>of</span> <span style='color: #0086b3'>15</span> <span style='color: #333333'>then</span> <span style='color: #183691'>&quot;fizzbuzz&quot;</span>
2424
<span style='color: #a71d5d'>If</span> <span style='color: #795da3'>Multiple</span> <span style='color: #333333'>of</span> <span style='color: #0086b3'>3</span> <span style='color: #333333'>then</span> <span style='color: #183691'>&quot;fizz&quot;</span>
2525
<span style='color: #a71d5d'>If</span> <span style='color: #795da3'>Multiple</span> <span style='color: #333333'>of</span> <span style='color: #0086b3'>5</span> <span style='color: #333333'>then</span> <span style='color: #183691'>&quot;buzz&quot;</span>
26-
<span style='color: #333333'>else</span> <span style='color: #795da3'>N</span>
26+
<span style='color: #333333'>else</span> <span style='color: #795da3'>N</span>
2727
<span style='color: #4e4e4e'>)</span>;
2828

2929
<span style='color: #a71d5d'>For</span> <span style='color: #333333'>each</span> <span style='color: #333333'>in</span> <span style='color: #183691'>Range</span> <span style='color: #0086b3'>1</span> <span style='color: #333333'>to</span> <span style='color: #0086b3'>100</span> <span style='color: #4e4e4e'>(</span><span style='color: #183691'>Print</span> <span style='color: #795da3'>Fizzbuzz</span><span style='color: #4e4e4e'>)</span>

public/main.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)