1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-20 04:12:09 +00:00
seirdy.one/themes/etch-custom/assets/css/main.css
rohan kumar e8f31f9f08
Adjust text width/responsiveness
- 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.
2020-12-17 11:23:37 -08:00

90 lines
1,008 B
CSS

html {
font-family: sans-serif;
font-size: 16px;
line-height: 1.5rem;
}
body {
margin: 0 auto;
max-width: 50rem;
padding: 2rem;
}
header nav {
display: block;
padding: 0 0 0.25rem;
}
header nav ul {
font-size: 1.25rem;
list-style-type: none;
margin: 0;
padding: 0;
}
header nav ul li {
display: block;
padding: 0.5rem 0.25rem;
}
.home {
font-size: 1.5rem;
font-weight: bold;
padding: 0 0.4rem 1rem 0;
}
/* index.html styles */
main .posts {
list-style-type: none;
padding: 0;
}
main .posts li {
margin-bottom: 1rem;
}
h1 {
font-size: 1.5rem;
line-height: 2rem;
margin: 1.5rem 0 1rem;
}
h2 {
font-size: 1.25rem;
margin: 1.5rem 0 1rem;
}
h3 {
font-size: 1.125rem;
margin: 1.5rem 0 1rem;
}
img {
height: auto;
margin: 0 auto;
max-width: 100%;
}
code {
font-size: 16px;
padding: 0.1rem 0.25rem;
}
pre,
code {
border: 1px solid #e3e3e3;
}
pre code {
border: none;
}
pre {
overflow-x: scroll;
overflow-y: visible;
padding: 0.5rem;
}
footer {
margin: 2rem 0;
}