mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Improve print stylesheets
- Don't pad nav on print - Link underlines in the TOC are not necessary in print - Show home link on print
This commit is contained in:
parent
1502d59e59
commit
abc7b57e95
3 changed files with 23 additions and 16 deletions
|
@ -42,6 +42,22 @@ html {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
max-width: 38em;
|
max-width: 38em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Compensate for misalignment caused by a padding increase. */
|
||||||
|
header nav,
|
||||||
|
footer nav {
|
||||||
|
margin: -.375em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Increase nav link tap target size a bit */
|
||||||
|
nav a {
|
||||||
|
padding: .125em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
nav li {
|
||||||
|
line-height: 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Small text is easier to read when slightly bolder.
|
/* Small text is easier to read when slightly bolder.
|
||||||
|
@ -95,17 +111,6 @@ h1 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compensate for misalignment caused by a padding increase. */
|
|
||||||
header nav,
|
|
||||||
footer nav {
|
|
||||||
margin: -.375em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Increase nav link tap target size a bit */
|
|
||||||
nav a {
|
|
||||||
padding: .125em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Save some space and paper by making the site nav and footer
|
/* Save some space and paper by making the site nav and footer
|
||||||
* links single-line, but bump up the line-height to increase
|
* links single-line, but bump up the line-height to increase
|
||||||
* space between tap-targets (a11y) */
|
* space between tap-targets (a11y) */
|
||||||
|
@ -115,9 +120,6 @@ footer li {
|
||||||
margin: .25em;
|
margin: .25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li {
|
|
||||||
line-height: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Lists without bullets: navlinks, posts lists, webmentions.
|
/* Lists without bullets: navlinks, posts lists, webmentions.
|
||||||
* Those three are lists whose items are already easily
|
* Those three are lists whose items are already easily
|
||||||
|
|
|
@ -9,6 +9,12 @@
|
||||||
header nav a:not([rel="home"]) span {
|
header nav a:not([rel="home"]) span {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* unerlines in TOC get in the way. */
|
||||||
|
nav[role="doc-toc"] a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print: don't orphan headings */
|
/* Print: don't orphan headings */
|
||||||
|
|
|
@ -30,9 +30,8 @@
|
||||||
{{ $favicon := resources.Get "/favicon.png" -}}
|
{{ $favicon := resources.Get "/favicon.png" -}}
|
||||||
{{ $favicon_base64 := $favicon.Content | base64Encode }}
|
{{ $favicon_base64 := $favicon.Content | base64Encode }}
|
||||||
{{ printf `<link rel="icon" sizes="32x32" href="data:image/png;base64,%s" type="image/png">` $favicon_base64 | safeHTML -}}
|
{{ printf `<link rel="icon" sizes="32x32" href="data:image/png;base64,%s" type="image/png">` $favicon_base64 | safeHTML -}}
|
||||||
<!-- Why does apple do this -->
|
|
||||||
<meta name="color-scheme" content="light dark">
|
<meta name="color-scheme" content="light dark">
|
||||||
<meta name="format-detection" content="telephone=no">
|
<meta name="format-detection" content="telephone=no"><!-- Why does apple do this -->
|
||||||
<meta name="theme-color" content="#0f0f0b" media="(prefers-color-scheme:dark)">
|
<meta name="theme-color" content="#0f0f0b" media="(prefers-color-scheme:dark)">
|
||||||
<meta name="theme-color" content="#fff" media="(prefers-color-scheme:light)">
|
<meta name="theme-color" content="#fff" media="(prefers-color-scheme:light)">
|
||||||
<!-- inline CSS; remember to allow it with a hash in the CSP -->
|
<!-- inline CSS; remember to allow it with a hash in the CSP -->
|
||||||
|
|
Loading…
Reference in a new issue