blog/assets/scss/_media.scss

133 lines
2.7 KiB
SCSS
Raw Normal View History

// media queries
2020-08-16 02:25:17 +00:00
@media only screen and (max-width: $screen-laptop) {
main {
article {
p,
ul,
h3,
h4,
section,
blockquote {
width: min(60vmax, 100%); // increase the column width a bit
}
h2 {
margin: 2vmax 5vmin 1vmax;
}
h3 {
margin: 2vmax 0 1vmax;
}
}
}
#toc {
2020-08-16 02:25:17 +00:00
right: -50vw;
width: 50vw;
}
}
@media only screen and (max-width: $screen-tablet) {
header {
nav {
display: none;
}
}
main {
align-self: stretch;
overflow-x: hidden; // safety for negative figure margin below
width: auto !important;
aside,
article h2,
article h3,
article h4,
article p,
article blockquote {
margin-left: 0;
margin-right: 0;
max-width: 100%;
text-align: left;
width: 100%;
}
article {
ul {
align-self: start;
padding: 0;
width: 100%;
}
figure {
margin: 2vmax -6vmin 1vmax; // move images outward
max-width: 100vw;
figcaption {
margin: 0 12vmin;
}
}
}
&#list {
// move the numbers to the top
section {
list-style-position: inside;
h2 {
margin-top: 1vmax;
}
}
}
}
ul.list li {
flex-direction: column;
time {
padding: 1vmax 0 0 0;
}
}
#toc {
right: -67vw;
width: 67vw;
}
}
2020-08-16 02:25:17 +00:00
@media only screen and (max-width: $screen-mobile) {
section#author {
align-items: center;
flex-direction: column;
span {
display: block;
padding-bottom: 0.5vmax;
}
}
footer section {
flex-direction: column;
}
#toc {
2020-08-16 02:25:17 +00:00
display: none;
}
.hidden-mobile {
display: none;
}
}
@media only screen and (max-width: $screen-narrow) {
main aside img#banner {
display: block;
}
}
@media only screen and (min-width: $screen-tablet) {
.show-mobile {
display: none;
}
}
@media only screen and (min-width: $screen-display) {
main article h2 {
margin: 2vmax 7vmin 1vmax;
}
ul.list li time {
padding-left: 3rem;
}
}
@media only screen and (min-width: $screen-full) {
main article h2 {
margin: 2vmax 5vmin 1vmax;
}
}