Articles Tagged
88 Articles
text-box-trim
The
text-box-trim
property let us specify whether to trim the whitespace above or/and below text “Pretty” is in the eye of the beholder
Yay, let's jump for
text-wrap: pretty
landing in Safari Technology Preview! But beware that it's different from how it works in Chromium browsers.
Geoff Graham
on
Positioning Text Around Elements With CSS Offset
When it comes to positioning elements on a page, including text, there are many ways to go about it in CSS — the literal
position
property with corresponding inset-*
properties, translate
, margin
, anchor()
(limited browser support at the moment), and so forth. The offset
property is another one that belongs in that list.
Preethi
on
font-size-adjust
This property gives developers the ability to set the font-size
of an element depending on the size of its lowercase letters, rather than the uppercase letters.
.element {
font-size: 22px;
font-size-adjust: 0.5;
}
In this case the lowercase letters of …
Geoff Graham
on
Fluid Superscripts and Subscripts
How much attention do you pay to the alignments of your subscripts and superscripts? Lorenz Wöehr has you covered with a recipe for fluid scaling.
Lorenz Woehr
on
Tim Brown: Flexible Typesetting is now yours, for free
Another title from A Book Apart has been re-released for free. The latest? Tim Brown's Flexible Typesetting. I may not be the utmost expert on typography and its best practices but I do remember reading this book (it's still on the shelf next to me!) thinking maybe, just maybe, I might be able to hold a conversation about it with Robin when I finished it.
Geoff Graham
on
You can use text-wrap: balance; on icons
The CSS text-wrap property is (rightfully) widely assumed to be used strictly for text elements. But Terrence Eden posted an article on his blog that shows how it can also be used to balance the way other types of elements wrap, including icons.
Geoff Graham
on
Clamp it! VS Code extension
There’s a lot of math behind fluid typography. CSS does make the math a lot easier these days, but even if you’re comfortable with that, writing the full declaration can be verbose and tough to remember. I know I often …
Geoff Graham
on