Reduce spacing and improve readability on smaller screens

This commit is contained in:
Daniel Siepmann 2020-01-10 12:18:48 +01:00
parent 1193914f8b
commit 2bafe757fc
3 changed files with 53 additions and 6 deletions

View file

@ -43,6 +43,15 @@ body > main {
}
}
}
@media (min-width: 1440px) {
section {
& > a:first-child + {
h1, h2, h3, h4, h5, h6 {
margin-top: $spacer * 4;
}
}
}
}
li {
padding: {
@ -56,12 +65,6 @@ section {
font-size: 1.5em;
padding-bottom: $spacer * 2;
}
& > a:first-child + {
h1, h2, h3, h4, h5, h6 {
margin-top: $spacer * 4;
}
}
}
article {
@ -93,3 +96,21 @@ article {
}
}
}
article main,
main > section {
-webkit-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
p {
text-align: justify;
// SOURCE: https://kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
/* Warning: Needed for oldIE support, but words are broken up letter-by-letter */
word-break: break-all;
/* Non standard for webkit */
word-break: break-word;
}
}

View file

@ -6,3 +6,9 @@ body > header {
text-decoration: none;
}
}
@media (max-width: 1439px) {
body > header {
padding-bottom: $spacer;
}
}

View file

@ -20,3 +20,23 @@ body.LayoutBlogPost {
}
}
}
@media (max-width: 1023px) {
body.LayoutBlogPost {
article,
article > main {
padding-right: 0;
}
}
}
@media (max-width: 1439px) {
body.LayoutBlogPost {
article {
padding-top: 0;
header h1 {
padding-top: 0;
}
}
}
}