mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-14 17:42:09 +00:00
e8f31f9f08
- Text width was too wide on wide screens; reduce it. - Make the nav-links' responsive layout for narrow viewports trigger at a narrower window size. It used to trigger at 600px, but I made it trigger at 32rem instead since the nav links aren't too wide. This also handles cases where users' default sans-serif fonts are very wide: rem measures by character width instead of pixels. - Make the narrow-optimized multiline-navlinks the default, and make widescreens a special case detected with a CSS media query. Previously, widescreens were the default; however, this meant that browsers that didn't support media queries (like dillo and netsurf) couldn't switch to the multi-line navigation at narrow widths. This is a good example of progressive enhancement; modern browsers will get the same behavior as before, but the lowest common denominator will see a better experience. - Don't further reduce the max-width for narrow screens; narrow screens are already narrow. We now have one less CSS rule.
18 lines
203 B
CSS
18 lines
203 B
CSS
@media (min-width: 32rem) {
|
|
body {
|
|
padding: 2rem 5%;
|
|
}
|
|
|
|
header nav {
|
|
display: inline-block;
|
|
}
|
|
|
|
header nav ul li {
|
|
display: inline;
|
|
padding: 0 0.25rem;
|
|
}
|
|
|
|
.home {
|
|
padding-bottom: 0;
|
|
}
|
|
}
|