use css nesting selector to mimic html layout

main
Jonathan Dahan 12 months ago
parent f87b71d901
commit 5899d1bb71

@ -4,65 +4,57 @@ body {
padding: 1em;
}
nav {
header {
flex-shrink: 0;
& > nav {
display: flex;
font-size: xx-large;
}
menu {
& a {
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
& > menu {
padding: 0;
margin: 0;
}
menu li {
marker: none;
list-style: none;
/* display: none; /* TODO: go vertical / dropdown on small screens */ */
}
menu:hover li {
/* TODO: go vertical / dropdown on small screens
& li { display: none }
& li.active { display: inherit }
&:hover li {
transition: display 1s ease-in-out;
display: block;
}
menu li.active {
display: inherit;
}
header {
flex-shrink: 0;
}
*/
}
}
}
main {
padding-left: 1.5rem;
}
nav a {
text-decoration: none;
color: inherit
}
nav a:hover {
text-decoration: underline
}
/* used mostly by .zs/index */
ul li {
display: flex;
align-items: baseline;
}
ul li span {
& span {
min-width: 5em;
text-align: right;
padding-right: 1rem;
line-height: 1.5rem;
vertical-align: baseline;
}
font-size: smaller;
}
ul li a {
& a {
font-size: larger;
}
}
a { color: inherit }
li { list-style: none }
:root {
--red: #f21332;
--orange: #f27225;

Loading…
Cancel
Save