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);
|
||||
padding: 15px;
|
||||
font-size: 1rem;
|
||||
left: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:not(.inline) {
|
||||
width: 50%;
|
||||
position: absolute;
|
||||
margin-left: 15px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
p:first-child { margin-top: 0; }
|
||||
p:last-child { margin-bottom: 0; }
|
||||
}
|
||||
|
@ -734,11 +726,16 @@ table {
|
|||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1455px) {
|
||||
article .article-content aside {
|
||||
position: initial;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
transform: unset;
|
||||
// 720 + 30 + 720 + 15
|
||||
// main content, l/r container padding, aside width (50% on each side), outer edge margin
|
||||
// inner edge margin overlaps with container padding
|
||||
@media (min-width: 1485px) {
|
||||
article .article-content aside:not(.inline) {
|
||||
width: 50%;
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue