frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

I spent years trying to make CSS states predictable

https://tenphi.me/blog/why-i-spent-years-trying-to-make-css-states-predictable/
20•tenphi•7h ago

Comments

tenphi•6h ago
Happy to take questions! I built this because I kept hitting the same wall: CSS state resolution is opaque when states overlap, and extending components means mentally re-deriving the whole selector matrix every time.

Some topics I'm curious what people think about:

- What’s the one thing this doesn’t cover that you’d expect it to?

- Does the syntax feel natural to you, or did you find yourself confused by anything?

- I'm looking for edge cases: what kind of complex selector scenario would trip this compiler up or be impossible to express with this model?

AMA—happy to answer any questions about the tool, the implementation, or the design choices.

chrismorgan•1h ago
This sounds interesting, but I’d need to think about it more so I could picture how things fit together as they get more complex and different styles logically overlap. This looks to head in the utility direction possibly too far for that to work nicely. But it may well work better than I’m initially imagining.

Unfortunately I can’t give it more attention now, because I should have gone to sleep a couple of hours ago…

—⁂—

Another approach entirely is to embrace last-declaration-wins, by :where()ing everything:

  :where(.t0)           { background: var(--primary-color); }
  :where(.t0:hover)     { background: var(--primary-hover-color); }
  :where(.t0:active)    { background: var(--primary-pressed-color); }
  :where(.t0[disabled]) { background: var(--surface-color); }
I’d be interested to know which approach performs better once you have altogether too many elements and altogether too complex selectors. I suspect the :where() would win, but that the difference would be impossible to detect in any sort of realistic load.
porsager•50m ago
Probably because you aren't using Sin

GPT-5.5

https://openai.com/index/introducing-gpt-5-5/
601•rd•1h ago•257 comments

An update on recent Claude Code quality reports

https://www.anthropic.com/engineering/april-23-postmortem
317•mfiguiere•2h ago•192 comments

Bitwarden CLI compromised in ongoing Checkmarx supply chain campaign

https://socket.dev/blog/bitwarden-cli-compromised
463•tosh•5h ago•223 comments

Girl, 10, finds rare Mexican axolotl under Welsh bridge

https://www.bbc.com/news/articles/c9d4zgnqpqeo
32•codezero•50m ago•13 comments

Meta to cut 10% of jobs, or 8k employees

https://techcrunch.com/2026/04/23/meta-job-cuts-10-percent-8000-employees/
152•Vaslo•1h ago•92 comments

MeshCore development team splits over trademark dispute and AI-generated code

https://blog.meshcore.io/2026/04/23/the-split
65•wielebny•3h ago•45 comments

Incident with multple GitHub services

https://www.githubstatus.com/incidents/myrbk7jvvs6p
129•bwannasek•3h ago•61 comments

Palantir employees are starting to wonder if they're the bad guys

https://www.wired.com/story/palantir-employees-are-starting-to-wonder-if-theyre-the-bad-guys/
284•pavel_lishin•2h ago•195 comments

French government agency confirms breach as hacker offers to sell data

https://www.bleepingcomputer.com/news/security/french-govt-agency-confirms-breach-as-hacker-offer...
313•robtherobber•3h ago•105 comments

I am building a cloud

https://crawshaw.io/blog/building-a-cloud
893•bumbledraven•15h ago•449 comments

A DIY Watch You Can Actually Wear

https://www.hackster.io/news/a-diy-watch-you-can-actually-wear-8f91c2dac682
89•sarusso•2d ago•43 comments

Your hex editor should color-code bytes

https://simonomi.dev/blog/color-code-your-bytes/
423•tobr•2d ago•124 comments

Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite

https://github.com/russellromney/honker
196•russellthehippo•8h ago•26 comments

Advanced Packaging Limits Come into Focus

https://semiengineering.com/advanced-packaging-limits-come-into-focus/
8•PaulHoule•2d ago•0 comments

Astronomers Find the Edge of the Milky Way

https://skyandtelescope.org/astronomy-news/astronomers-find-the-edge-of-the-milky-way/
11•bookofjoe•1h ago•0 comments

I spent years trying to make CSS states predictable

https://tenphi.me/blog/why-i-spent-years-trying-to-make-css-states-predictable/
21•tenphi•7h ago•3 comments

Apple fixes bug that cops used to extract deleted chat messages from iPhones

https://techcrunch.com/2026/04/22/apple-fixes-bug-that-cops-used-to-extract-deleted-chat-messages...
806•cdrnsf•23h ago•180 comments

If America's so rich, how'd it get so sad?

https://www.derekthompson.org/p/if-americas-so-rich-howd-it-get-so
248•momentmaker•3h ago•464 comments

Writing a C Compiler, in Zig (2025)

https://ar-ms.me/thoughts/c-compiler-1-zig/
107•tosh•10h ago•35 comments

We found a stable Firefox identifier linking all your private Tor identities

https://fingerprint.com/blog/firefox-tor-indexeddb-privacy-vulnerability/
879•danpinto•1d ago•265 comments

Jiga (YC W21) Is Hiring

https://jiga.io/about-us/
1•grmmph•7h ago

Arch Linux Now Has a Bit-for-Bit Reproducible Docker Image

https://antiz.fr/blog/archlinux-now-has-a-reproducible-docker-image/
261•maxloh•18h ago•90 comments

A Renaissance gambling dispute spawned probability theory

https://www.scientificamerican.com/article/how-a-renaissance-gambling-dispute-spawned-probability...
76•sohkamyung•2d ago•11 comments

Alberta startup sells no-tech tractors for half price

https://wheelfront.com/this-alberta-startup-sells-no-tech-tractors-for-half-price/
2087•Kaibeezy•1d ago•713 comments

Investigation uncovers two sophisticated telecom surveillance campaigns

https://techcrunch.com/2026/04/23/surveillance-vendors-caught-abusing-access-to-telcos-to-track-p...
352•mentalgear•7h ago•122 comments

Our newsroom AI policy

https://arstechnica.com/staff/2026/04/our-newsroom-ai-policy/
175•zdw•14h ago•114 comments

Isopods of the world

https://isopod.site/
118•debesyla•2d ago•46 comments

People Do Not Yearn for Automation

https://www.theverge.com/podcast/917029/software-brain-ai-backlash-databases-automation
43•icco•2h ago•22 comments

'Hairdryer used to trick weather sensor' to win Polymarket bet

https://www.telegraph.co.uk/business/2026/04/23/hairdryer-used-trick-weather-sensor-34000-polymar...
203•zdw•2h ago•204 comments

A True Life Hack: What Physical 'Life Force' Turns Biology's Wheels?

https://www.quantamagazine.org/what-physical-life-force-turns-biologys-wheels-20260420/
173•Prof_Sigmund•2d ago•43 comments