No more layout wobble

main
Jonathan Dahan 12 months ago
parent 1c61a64c08
commit 66388edb48

@ -3,32 +3,18 @@ body {
padding: 1em; padding: 1em;
max-width: 1280px; max-width: 1280px;
display: flex; display: flex;
flex-wrap: wrap; gap: 2em;
justify-content: space-between;
gap: 1.5em;
}
img, video { max-width: 100% }
#landing { display: none; text-decoration: underline }
@media (orientation: portrait) {
#landing.active { display: block }
}
@media (orientation: portrait) {
main {
min-width: fit-content
}
} }
header { header {
flex-shrink: 0; background: white;
position: sticky;
top: 1em;
& > nav { & > nav {
background: white;
position: sticky;
display: flex; display: flex;
font-size: xx-large; font-size: xx-large;
position: sticky;
top: 1em;
flex-wrap: wrap; flex-wrap: wrap;
& a { & a {
text-decoration: none; text-decoration: none;
@ -39,31 +25,64 @@ header {
& > menu { & > menu {
padding: 0; padding: 0;
margin: 0; margin: 0;
/* turn the menu into a dynamic one for highly vertical devices */
@media (orientation: portrait) {
& li { transition: display 3s ease; visibility: collapse }
/* TODO: try this
transition: opacity 1s ease-out;
opacity: 0;
height: 0;
overflow: hidden;
TO
opacity: 1;
height: auto;
*/
& li.active { visibility: inherit }
&:hover li { visibility: initial }
}
} }
} }
} }
main { flex: 1 } main {
flex: 1;
}
/* single element niceties */
a { color: inherit }
img, video { max-width: 100% }
li { list-style: none }
/* the /??? which shows in the nav on the homepage */
#landing {
display: none;
text-decoration: underline;
}
/* turn the menu into a dynamic one for highly vertical devices */
@media (orientation: portrait) {
#landing.active {
display: block;
}
main {
min-width: fit-content;
}
header {
max-height: 2em;
& > menu {
& li {
transition: display 3s ease;
visibility: collapse;
display: none;
}
& li.active {
visibility: inherit;
display: block;
}
&:hover li {
visibility: initial;
display: block;
}
}
}
body {
flex-direction: column;
}
}
/* used mostly by .zs/index, should maybe class it? */ /* used mostly by .zs/index, should maybe class it? */
ul { padding-left: 0 } ul {
padding-left: 0;
}
#post-index + ul li, #projects + ul li { /* lists that have optional dates associated with them */
#post-index + ul li,
#projects + ul li {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
@ -80,9 +99,6 @@ ul { padding-left: 0 }
} }
} }
a { color: inherit }
li { list-style: none }
:root { :root {
--red: #f21332; --red: #f21332;
--orange: #f27225; --orange: #f27225;
@ -93,9 +109,27 @@ li { list-style: none }
--purple: #a033b3; --purple: #a033b3;
} }
li:nth-of-type(6n + 1):hover, li.active:nth-of-type(6n + 1) { color: var(--red) } li:nth-of-type(6n + 1):hover,
li:nth-of-type(6n + 2):hover, li.active:nth-of-type(6n + 2) { color: var(--orange) } li.active:nth-of-type(6n + 1) {
li:nth-of-type(6n + 3):hover, li.active:nth-of-type(6n + 3) { color: var(--pink) } color: var(--red);
li:nth-of-type(6n + 4):hover, li.active:nth-of-type(6n + 4) { color: var(--green) } }
li:nth-of-type(6n + 5):hover, li.active:nth-of-type(6n + 5) { color: var(--blue) } li:nth-of-type(6n + 2):hover,
li:nth-of-type(6n + 6):hover, li.active:nth-of-type(6n + 6) { color: var(--purple) } li.active:nth-of-type(6n + 2) {
color: var(--orange);
}
li:nth-of-type(6n + 3):hover,
li.active:nth-of-type(6n + 3) {
color: var(--pink);
}
li:nth-of-type(6n + 4):hover,
li.active:nth-of-type(6n + 4) {
color: var(--green);
}
li:nth-of-type(6n + 5):hover,
li.active:nth-of-type(6n + 5) {
color: var(--blue);
}
li:nth-of-type(6n + 6):hover,
li.active:nth-of-type(6n + 6) {
color: var(--purple);
}

Loading…
Cancel
Save