2024-12-26 (Thursday)
Printing the web, part 1: retrieving content from the web Printing the web, part 2: HTML and CSS for printing books Prince: Tool to convert HTML to PDF which supports all the cool CSS features for printing. It’s quite expensive, but there are reasonably priced cloud resellers.
2024-12-09 (Monday)
CSS Grid Alignment & Justification Without the Guesswork
The grid proper lives inside the parent element. It might be smaller.
Similarly the child elements are inside the grid cells. They may be smaller.
justify-* is always horizontal, align-* is always vertical. (Is that troe, or is it in inline resp. block direction? Doesn’t really matter as I won’t change these.
place-* is a shortcut for justify-* and align-*.
*-items moves the children within their cells.
2024-07-31 (Wednesday)
Grid lines named *-start and *-end implicitely define areas which can overlap.
These lines can also be used as “anchors” for position: absolute.
https://www.youtube.com/watch?v=ciuZJE74wBA
2023-11-10 (Friday)
.content-grid { display: grid; grid-template-columns: 1fr [content-start] 1fr [content-end] 1fr; } .content-grid > * { grid-column: content; /* = between content-start and content-end */ } Kevin Powell: A new approach to container and wrapper classes (Youtube)
2023-10-23 (Monday)
Tether elements to each other with CSS anchor positioning CSS Anchor Is The Best New CSS Feature Since Flexbox See also: popover
2023-02-08 (Wednesday)
How to write Semantic CSS
<li aria-current="page">...</li> nav li[aria-current="page"] { ... } and related stuff
2022-06-13 (Monday)
hover hover none pointer: coarse fine Kevin Powell: Dealing with hover on mobile
2022-03-13 (Sunday)
While HTML allows any character in an id, CSS is much more strict. The only (ASCII) punctuation characters you can use are - and _.
This also affects APIs which use CSS selectors to select elements, e.g. htmx or jQuery.
2021-09-30 (Thursday)
Config variable for @media (prefers-color-scheme: xxx) in Firefox:
ui.systemUsesDarkTheme (number)
value meaning 0 light 2 dark 3 no preference
2021-08-24 (Tuesday)
Improve your CSS by taking HSL and Custom Props to the next level Aug 24, 2021
Custom properties are just text replacement, so you can use and fragment of a property, e.g.
:root { --hue: 204; --saturation: 100%; --lighntess: 30%; } .card { background: hsl(var(--hue) var(--saturation) var(--lightness) / 0.9) } New color syntax (no commas, slash): hsl(204 100% 30% / 0.9)
Custom properties are cascaded like all properties.
[min(), max(), and clamp() are CSS magic!
2021-04-22 (Thursday)
display: flow-root
accent-color (for form elements, etc.)
color-scheme
aspect-ratio
size-adjust
Cascade layers
:has() (parent selector, not yet in FF :-()
2020-09-16 (Wednesday)
Wakamai Fondue, the tool that answers the question “what can my font do?”