Responsive improvements

More reliable spacing using vmin for vertical rhythm, which automatically prevents issues at larger viewport sizes when using vw
This commit is contained in:
John O'Nolan 2019-11-17 16:45:16 +07:00
parent 94c51eaf42
commit ab990b71f1
7 changed files with 32 additions and 69 deletions

View file

@ -2,6 +2,7 @@
/* Content grid
/* ---------------------------------------------------------- */
.gh-canvas {
display: grid;
grid-template-columns:
@ -43,11 +44,11 @@
[full-start]
4vw
[wide-start]
auto
0
[main-start]
auto
[main-end]
auto
0
[wide-end]
4vw
[full-end]
@ -72,18 +73,7 @@
/* ---------------------------------------------------------- */
.gh-content > * + * {
margin-top: 4vw;
}
@media (min-width: 600px) {
.gh-content > * + * {
margin-top: 3vw;
}
}
@media (min-width: 1100px) {
.gh-content > * + * {
margin-top: 4.2rem;
}
margin-top: 4vmin;
}
.gh-content > [id] + * {
@ -117,11 +107,11 @@
}
.gh-content hr {
margin-top: 5vw;
margin-top: 6vmin;
}
.gh-content hr + * {
margin-top: 5vw !important;
margin-top: 6vmin !important;
}
.gh-content blockquote {
@ -158,30 +148,11 @@
/* ---------------------------------------------------------- */
:not(.kg-card):not([id]) + .kg-card {
margin-top: 6vw;
margin-top: 6vmin;
}
.kg-card + :not(.kg-card):not([id]) {
margin-top: 6vw;
}
@media (min-width: 600px) {
:not(.kg-card):not([id]) + .kg-card {
margin-top: 6vw;
}
.kg-card + :not(.kg-card):not([id]) {
margin-top: 6vw;
}
}
@media (min-width: 1100px) {
:not(.kg-card):not([id]) + .kg-card {
margin-top: 6rem;
}
.kg-card + :not(.kg-card):not([id]) {
margin-top: 6rem;
}
margin-top: 6vmin;
}
.kg-card figcaption {
@ -415,14 +386,3 @@
.gh-content tbody tr:last-child {
border-bottom: 1px solid rgba(0,0,0,.1);
}
/* Third Party
/* ---------------------------------------------------------- */
.kg-card iframe[src*="spotify.com"] {
width: 100%;
height: 25vw;
min-height: 200px;
max-height: 400px;
}