forked from shadowfacts/shadowfacts.net
Fix asides not collapsing to inline for small viewports
This commit is contained in:
parent
3e23336622
commit
49c721d0b9
|
@ -229,16 +229,8 @@ article {
|
||||||
border: 1px solid var(--aside-border);
|
border: 1px solid var(--aside-border);
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
left: 100%;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
&:not(.inline) {
|
|
||||||
width: 50%;
|
|
||||||
position: absolute;
|
|
||||||
margin-left: 15px;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
p:first-child { margin-top: 0; }
|
p:first-child { margin-top: 0; }
|
||||||
p:last-child { margin-bottom: 0; }
|
p:last-child { margin-bottom: 0; }
|
||||||
}
|
}
|
||||||
|
@ -734,11 +726,16 @@ table {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1455px) {
|
// 720 + 30 + 720 + 15
|
||||||
article .article-content aside {
|
// main content, l/r container padding, aside width (50% on each side), outer edge margin
|
||||||
position: initial;
|
// inner edge margin overlaps with container padding
|
||||||
width: 100%;
|
@media (min-width: 1485px) {
|
||||||
margin: 0;
|
article .article-content aside:not(.inline) {
|
||||||
transform: unset;
|
width: 50%;
|
||||||
|
position: absolute;
|
||||||
|
left: 100%;
|
||||||
|
margin-left: 15px;
|
||||||
|
margin-right: 15px;
|
||||||
|
transform: translateY(-50%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue