frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

CSS: Unavoidable Bad Parts

https://matklad.github.io/2026/06/04/css-unavoidable-bad-parts.html
17•surprisetalk•1d ago

Comments

alwillis•1d ago
In 2026, you can avoid the bad parts.

> Let's start with the basics: if you write`font-size: 16px`then `16px` is the size of what? Sadly, the answer is "nothing in particular" -- this is a size of a virtual box around the glyph, but the box isn't tight, and the size of the glyph varies, depending on the font. Luckily, `font-size-adjust` property can fix it, and make `font-size` consistent across fonts.

All modern browsers default to 16px, but for accessibility and sanity reasons, we shouldn't use pixels.

By default, 16px = 1rem. You don't need to declare it; it just is.

Also by default, 16px = 100% if using percentage for font-size.

See "The Ultimate Ideal Bestest Base Font Size That Everyone Is Keeping a Secret, Especially Chet" - https://adrianroselli.com/2024/03/the-ultimate-ideal-bestest...

> Can you just set `font-size: 18px`or whatever works best for your chosen font? I think the answer is yes, but there are some caveats to keep in mind.

If you want to manually increase the base size, using relative units is the answer: `html { font-size: 1.125rem }`. Since by default, 1rem = 16px, 1.125rem is 18px.

> Setting `font-size` in your CSS disables that second approach.

Setting `font-size` in pixels disables changing the browser's default size; works fine with relative sizes.

If the goal is not having to learn the intricacies of CSS, just use the built-in type scale:

    | CSS absolute-size values | xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large |
    | ------------------------ | -------- | ------- | ----- | ------ | ----- | ------- | -------- | --------- |
    | scaling factor           | 3/5      | 3/4     | 8/9   | 1      | 6/5   | 3/2     | 2/1      | 3/1       |
    | HTML headings            | h6       |         | h5    | h4     | h3    | h2      | h1       |           |
By default, medium is 16px which is 1rem.

You can write `p { font-size: medium }`.

BTW, the main use case of `font-size-adjust` is for changing the font size of your fallback font incase your primary web font doesn't load or if it takes too long depending on what `font-display` is set to. You want the metrics of the fallback font to match the primary font so the text doesn't shift [1].

[1]: https://www.w3.org/TR/css-fonts-4/#font-size-adjust-prop

AI agent runs amok in Fedora and elsewhere

https://lwn.net/SubscriberLink/1077035/c7e7c14fbd60fae9/
201•tanelpoder•4h ago•54 comments

Cybersecurity researchers aren't happy about the guardrails on Anthropic's Fable

https://techcrunch.com/2026/06/10/cybersecurity-researchers-arent-happy-about-the-guardrails-on-a...
289•speckx•11h ago•266 comments

πFS

https://github.com/philipl/pifs
576•helterskelter•9h ago•140 comments

Anthropic requires 30 day data retention for Fable and Mythos

https://support.claude.com/en/articles/15425996-data-retention-practices-for-mythos-class-models
261•lebovic•1d ago•120 comments

Sequoyah’s syllabary created a written language for the Cherokee

https://www.smithsonianmag.com/innovation/man-created-written-language-cherokee-did-efficiently-e...
124•grahambargeron•6h ago•80 comments

Klondike Solitaire game for curses in 5k of C

https://nanochess.org/klondike_in_c.html
40•nanochess•2d ago•0 comments

Vacuum-Form Signage

https://bethmathews.substack.com/p/the-history-behind-the-signs-lighting
29•benbreen•1d ago•4 comments

I'm Eric Ries, author of "The Lean Startup" and new book "Incorruptible" – AMA

566•eries•13h ago•438 comments

How JPL keeps the 13-year-old Curiosity rover doing science

https://spectrum.ieee.org/curiosity-rover-jpl-mars-science
191•pseudolus•10h ago•43 comments

PgDog is funded and coming to a database near you

https://pgdog.dev/blog/our-funding-announcement
417•levkk•14h ago•207 comments

CSS: Unavoidable Bad Parts

https://matklad.github.io/2026/06/04/css-unavoidable-bad-parts.html
19•surprisetalk•1d ago•1 comments

L'Affaire Siloxane

https://mceglowski.substack.com/p/laffaire-siloxane
178•idlewords•1d ago•27 comments

GeoLibre 1.0

https://geolibre.app/
180•jonbaer•10h ago•12 comments

Show HN: Extend UI – open-source UI kit for modern document apps

https://www.extend.ai/ui
173•kbyatnal•12h ago•42 comments

What is it like to be a bat? (1974) [pdf]

https://www.sas.upenn.edu/~cavitch/pdf-library/Nagel_Bat.pdf
75•shadow28•7h ago•68 comments

Deficient executive control in transformer attention

https://academic.oup.com/pnasnexus/article/5/6/pgag149/8698838
29•derbOac•4h ago•9 comments

Who's the smartest corvid?

https://thetyee.ca/Culture/2026/06/05/Whos-the-Smartest-Corvid/
83•NaOH•1d ago•69 comments

Raspberry Pi 5 – 16GB RAM

https://www.adafruit.com/product/6125?src=raspberrypi
195•akman•8h ago•208 comments

The Road to the WASM Component Model 1.0

https://bytecodealliance.org/articles/the-road-to-component-model-1-0
6•emschwartz•2d ago•1 comments

Building an HTML-first site doubled our users overnight

https://mohkohn.co.uk/writing/html-first/
1026•edent•15h ago•473 comments

Unix GC Remastered

https://mohandacherir.github.io/Qdiv7/posts/unix_new_gc/
22•mananaysiempre•5h ago•2 comments

World Capitals Voronoi

https://www.jasondavies.com/maps/voronoi/capitals/
48•vincnetas•2d ago•23 comments

Show HN: HelixDB – A graph database built on object storage

https://github.com/HelixDB/helix-db/tree/main
98•GeorgeCurtis•12h ago•32 comments

Apache Burr: Build reliable AI agents and applications

https://burr.apache.org/
183•anhldbk•13h ago•95 comments

Claude Desktop spawns 1.8 GB Hyper-V VM on every launch, even for chat-only use

https://github.com/anthropics/claude-code/issues/29045
366•tonyrice•11h ago•255 comments

Notes on DeepSeek

136•vinhnx•14h ago•92 comments

All 9,300 Japanese train station, animated by the year it opened (1872–2026)

https://jivx.com/eki
210•momentmaker•16h ago•73 comments

Authentication issues related to API requests

https://www.githubstatus.com/incidents/fcj3088jg1wx
156•Multicomp•12h ago•31 comments

Smudging the game disc to make speedrunning 'SpongeBob' faster

https://www.inverse.com/input/gaming/the-dirty-secret-that-makes-speedrunning-on-spongebob-a-lot-...
82•pncnmnp•1d ago•47 comments

Are insecure code completions in PyCharm a vulnerability?

https://sethmlarson.dev/are-insecure-code-completions-a-vulnerability
5•12_throw_away•2h ago•0 comments