frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Modern CSS Code Snippets: Stop writing CSS like it's 2015

https://modern-css.com
79•eustoria•3h ago

Comments

laacz•1h ago
Is it just me or gradients and tile grid with specific hover effects are AI generated stuff giveaways? Maybe it's old people yelling at clouds, but I'm very reluctant to trust the site, when I see these signs.
apsurd•56m ago
AI got it from people though.

I too am saddened by the instant-polish marketing pages everyone and their grandma deploys to Render, but also some people at some point in time really did make these effects. And they are nice. HTML based UIs will always have a place in my heart.

Btw: actually I think webflow did more to pump this stuff out to the masses. The animate on scroll being the biggest offender. It's so good, but not for every literal text paragraph on your local bakery's website.

samhh•50m ago
You’re right not to trust it, it’s wrongly calling sibling-index() widely available. And that’s the first example I checked.
piskov•1h ago
2015 is good enough.

For example instead of grid center, one can use flex and margin auto.

If you are building really nation-wide products, there are still a lot of guys in corporate with old windows (where even chrome stopped updating like win7). Or, you know, old or poor people with PC from 2008.

Also don’t forget guys with mobile phones: not like one could easily install a browser there. Especially on phones which no longer receive updates.

So writing CSS like it is 2015 is great. Not because it feels great but because it is what caring about your users (and business) is.

Otherwise you’ll get humbled by your clients soon enough. And in corporate they won’t even be your clients unless you support old stuff: IE 11 is a great target if you really want to shine.

nicoburns•58m ago
I definitely don't agree with all of these, but grid centering is pretty nice and has a lot fewer quirks than Flexbox based solutions.
ktpsns•1h ago
CSS in 2025: Let's write html inlined styles as if it was 2005 and separation of formatting/representation was never invented. I talk of tailwind, of course.
h4x0rr•51m ago
Yeah let's do that. You have everything related to your component on place instead of jumping between files.
lawn•33m ago
Is jumping between files supposed to be difficult or something?
runarberg•30m ago
Also modern CSS is often written in a <style> tag either in a native web component or in a framework which supports single file component like vue or svelte.
chrisweekly•22m ago
Colocation is a useful principle in component-based architecture.
afiori•6m ago
Without a lot of discipline it is very easy to end up with a css with lots of unclear and hard to guess effects. Eg consider the case of <A type=1><B><A type=2></A></B></A> where A and B are complex templates. Any selector with the " " operator on A risk expanding to the inner A even if it was intended only for the outer. Similarly a :has selector might catch a descendant of the wrong element.

@scope fixes a lot of this, but it is a complex problem. With tailwind you mostly have to worry about inheritance

ewuhic•4m ago
Is staying in one file supposed to be difficult or something?
crooked-v•13m ago
Tailwind is a direct response to how the "C" in "CSS" actually sucks, so there's no surprise that it's so popular.
mattlondon•12m ago
Wait until you see React & JSX...

At least html and CSS are both presentation. React/JSX now confuses presentation and business logic.

jgalt212•53m ago
CSS and JavaScript are like two dysfunctional law enforcement agencies fighting over jurisdiction.
sublinear•47m ago
All web standards are like this, and then the battle continues when it comes to browser implementation.
Bengalilol•48m ago
Me: cool, let's be creative, I love 2026.

Browsers: Yeah, but beware of limited availability, most of those creative examples are in the 40-50% browsers support range.

graypegg•30m ago
In the past this was a major issue that meant useful features were only ever usable after IE/Safari finally supported them half a decade later, but it has seriously gotten better. Sadly as a result of Chromium's overbearing presence, but it's a helpful outcome at least.

https://wpt.fyi/interop-2025

user3939382•21m ago
CSS is the only thing from browsers we actually need. The rest can be done in a terminal. Contemporary terminals could even render the UI with way less memory. The browser is a nightmare because it wasn’t architected to run applications.
anematode•10m ago
Random pet peeve... it annoys me when people have old browser-specific aliases to standardized CSS properties. For example, -o-tab-size and -moz-tab-size instead of just tab-size. Those properties haven't done anything on Opera/Firefox for a decade!

LT6502: A 6502-based homebrew laptop

https://github.com/TechPaula/LT6502
233•classichasclass•4h ago•67 comments

GNU Pies – Program Invocation and Execution Supervisor

https://www.gnu.org.ua/software/pies/
22•smartmic•52m ago•13 comments

I Fixed Windows Native Development

https://marler8997.github.io/blog/fixed-windows/
577•deevus•10h ago•289 comments

EU bans the destruction of unsold apparel, clothing, accessories and footwear

https://environment.ec.europa.eu/news/new-eu-rules-stop-destruction-unsold-clothes-and-shoes-2026...
566•giuliomagnifico•4h ago•392 comments

Modern CSS Code Snippets: Stop writing CSS like it's 2015

https://modern-css.com
83•eustoria•3h ago•22 comments

Show HN: VOOG – Moog-style polyphonic synthesizer in Python with tkinter GUI

https://github.com/gpasquero/voog
34•gpasquero•2h ago•2 comments

Towards Autonomous Mathematics Research

https://arxiv.org/abs/2602.10177
54•gmays•3h ago•22 comments

Radio host David Greene says Google's NotebookLM tool stole his voice

https://www.washingtonpost.com/technology/2026/02/15/david-greene-google-ai-podcast/
8•mikhael•3h ago•3 comments

Real-time PathTracing with global illumination in WebGL

https://erichlof.github.io/THREE.js-PathTracing-Renderer/
90•tobr•3d ago•9 comments

Show HN: Microgpt is a GPT you can visualize in the browser

https://microgpt.boratto.ca
41•b44•3h ago•2 comments

Gwtar: A static efficient single-file HTML format

https://gwern.net/gwtar
136•theblazehen•6h ago•42 comments

Show HN: Knock-Knock.net – Visualizing the bots knocking on my server's door

https://knock-knock.net
55•djkurlander•4h ago•20 comments

Sony Jumbotron Image Control System (1998) [pdf]

https://pro.sony/s3/cms-static-content/operation-manual/3864848111.pdf
15•xattt•3d ago•4 comments

Audio is the one area small labs are winning

https://www.amplifypartners.com/blog-posts/arming-the-rebels-with-gpus-gradium-kyutai-and-audio-ai
6•rocauc•2d ago•0 comments

Hideki Sato, designer of all Sega's consoles, has died

https://www.videogameschronicle.com/news/hideki-sato-designer-of-segas-consoles-dies-age-75/
250•magoghm•5h ago•26 comments

Palantir Gets Millions of Dollars from New York City's Public Hospitals

https://theintercept.com/2026/02/15/palantir-contract-new-york-city-health-hospitals/
211•cdrnsf•4h ago•75 comments

Show HN: Lightwave – Real-time notes app, 3.5 years of hand-rolled JavaScript

10•jv22222•48m ago•11 comments

Oat – Ultra-lightweight, zero dependency, semantic HTML, CSS, JS UI library

https://oat.ink/
408•twapi•13h ago•115 comments

Flashpoint Archive – Over 200k web games and animations preserved

https://flashpointarchive.org
308•helloplanets•16h ago•73 comments

How Is Data Stored?

https://www.makingsoftware.com/chapters/how-is-data-stored
134•tzury•5d ago•14 comments

Pocketblue – Fedora Atomic for mobile devices

https://github.com/pocketblue/pocketblue
3•nikodunk•5h ago•0 comments

LEDs Enter the Nanoscale, But efficiency hurdles challenge the smallest LEDs yet

https://spectrum.ieee.org/nanoled-research-approaches
15•oldnetguy•3d ago•5 comments

I Gave Claude Access to My Pen Plotter

https://harmonique.one/posts/i-gave-claude-access-to-my-pen-plotter
3•futurecat•2d ago•3 comments

Show HN: DSCI – Dead Simple CI

https://github.com/melezhik/DSCI
3•melezhik•4h ago•1 comments

Palantir vs. the "Republik": US analytics firm takes magazine to court

https://www.heise.de/en/news/Palantir-vs-the-Republik-US-analytics-firm-takes-magazine-to-court-1...
167•cdrnsf•4h ago•56 comments

1940s Irish sci-fi novel features early mecha and gravity assists

https://github.com/cavedave/Manannan
58•donohoe•6h ago•21 comments

I need AI that scans every PR and issue and de-dupes

https://twitter.com/steipete/status/2023057089346580828
5•vibeprofessor•2h ago•1 comments

Reversed engineered game Starflight (1986)

https://github.com/s-macke/starflight-reverse
91•tosh•10h ago•43 comments

SCM as a database for the code

https://gist.github.com/gritzko/6e81b5391eacb585ae207f5e634db07e
60•gritzko•12h ago•75 comments

State Attorneys General Want to Tie Online Access to ID

https://reclaimthenet.org/40-attorneys-general-back-ids-online-safety-act
87•computerliker•1h ago•64 comments