The result looks like this: .
When using your OpenPGP keys with a smartcard (like YubiKey) remember to do a backup before executing keytocard
! Keys are not written but moved and will be irretrievable.
In his post The Simplest Way to Load CSS Asynchronously Scott Jehl uses the media
and onload
attributes to lazy load CSS.
<link
rel="stylesheet"
href="style.css"
media="print"
onload="this.media='all'"
/>
This can be combined with link preloading:
<link rel="preload" href="style.css" as="style" />
Make sure to have a fallback for loading without JavaScript!
<noscript>
<link rel="stylesheet" href="style.css" />
</noscript>
Vim's r
modifier suffix from the expand
command can be used to strip the file extension of a file name which comes in handy when converting files.
:! pandoc % -o %:r.pdf
The :placeholder-shown
pseudo class selects input
elements currently showing a placeholder.
In Possibly the Most Useful CSS Trick Fred Adams is using it to show a search button only when an input
field has been filled.
<input placeholder="Search …" />
<button>Search!</button>
input + button {
display: none;
}
input:not(:placeholder-shown) + button {
display: block;
}
Note: The ::placeholder
pseudo element styles the placeholder text.
CSS box-shadow
values are animatable.
a {
box-shadow: inset 0 -0.4em 0 #00ff00;
transition: box-shadow 0.3s;
}
a:hover {
box-shadow: inset 0 -1.2em #00ffff;
}