mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

16K
active users

#CSS

174 posts144 participants12 posts today

“Reimagining Fluid Typography” by @mia

🔗 oddbird.net/2025/02/12/fluid-t

> Never do pixel math with `em` and `rem` units. That’s where we went wrong, by assuming that `16px == 1em` is a reliable fact.

It reminds me a lot of what I was pretty vocal about a few years ago, including “People don't change the default 16px font size in their browser (You wish!)” and “Users DO change font size”.

But I don't understand how this code…

#font #CSS #em

⚓nicolas-hoizey.com/links/2025/

⚠️ Grammarly Is Quietly Breaking Websites—Here’s How

Web developer Daniel Bushell discovered that the Grammarly browser extension injects global CSS into every website—even if it’s not actively being used.

🔍 What’s happening?
・It overwrites --rem on :root, breaking layout calculations
・It bypasses Content Security Policy via stealth styles
・It injects a <grammarly-desktop-integration> tag on every page
・It even loads 20 unnecessary font variants

Bushell’s fix? Renaming his variables to --🤡.

This raises bigger questions about how browser extensions interact with the web—and the need for more respectful, sandboxed designs.

👉 dbushell.com/2025/03/29/et-tu-

dbushell.comEt tu, Grammarly?
More from David Bushell

A bit of fooling around. I started wondering if it's possible to style <head> and it's elements. It turns out you can! I managed to quickly remake <title> into a top bar. :D

You need to give `display: block` to <head> and then other elements inside too.

I can't think of many practical use cases for this, but who knows. This one time, I might need it.

#HTML #CSS #LegacyWeb

Is there a simple way to code force any browser to resize a portrait aspect ratio image (vertical) so it fits within a predefined box via a div, like the browser does to image files opened "raw" (not in HTML page, just as a file)?

I have a template I created to display images, but the vert images clip below the screen, so one must scroll, no matter what I try.

I AM using an older version of FF to test the page...

Thanks

Continued thread

Anyway, I’m noticing that “font size” is very ambiguous. Even the general wisdom of 16px being the smallest font-size to use — realistically in browsers that’s computed as something like 11-point-something-pixels (changes per font). These newer #CSS capabilities make me want more specific guidelines.

Continued thread

For example, the following will make the cap-height of the font and the text box equal to 16px exactly.

```css
font-size-adjust: cap-height 1;
text-box: trim-both cap alphabetic;
```

This means that a `line-height` of 1.5 will create 8px of line spacing. #CSS