this post was submitted on 29 Aug 2025
199 points (95.9% liked)

Technology

74643 readers
3634 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
 

cross-posted from: https://programming.dev/post/36492805

Comments

top 40 comments
sorted by: hot top controversial new old
[–] madcaesar@lemmy.world 1 points 41 minutes ago

The only language worse than JS is CSS...

[–] technocrit@lemmy.dbzer0.com 9 points 1 day ago

Clickbait. Actual less sensational point is in the text:

Not every site needs JavaScript.

[–] Octavio@lemmy.world 9 points 1 day ago (1 children)

Yeah, of course you can add front end interactivity with css, but you still need JavaScript to run your server-side.

If I told this to 2005 me he’d think I flipped my lid. 😜

[–] clif@lemmy.world 3 points 1 day ago

2005: Because server side is PHP... Obviously.

[–] ironcrotch@aussie.zone 33 points 1 day ago

I love CSS, every time I do frontend work I get to learn it all over again.

[–] alansuspect@aussie.zone 11 points 1 day ago

People use JavaScript for styling? Gross. Never liked JS, it's necessary for some things but I don't get building a 10mb site when a 0.1mb site is HTML/CSS would suffice.

Remember building for IE4/5 and had to check everything looked good with out JS because a lot of people had it disabled.

[–] addie@feddit.uk 10 points 1 day ago

The ability to do some basic calculations is what was missing in CSS from the start, IMHO. You don't want paragraph text to be too narrow or too wide as it would become unreadable, so a rule like "at least 20 ems, and then whichever is smaller of 100% or 80 ems centered on the page". But that required either really convoluted layout and rules, or just to work it out with JS after the page is loaded.

Would have been even better if we'd got Donald Knuth involved in the early CSS efforts, with some LaTeX-like attention to the details. There's no reason that computers can't render beautiful text, but it's rare for one person to be an expert typesetter and an expert programmer.

[–] clay_pidgin@sh.itjust.works 49 points 1 day ago (3 children)

Is it finally possible to align things on the first try with CSS?

[–] Sxan@piefed.zip 48 points 1 day ago
[–] victorz@lemmy.world 2 points 1 day ago

Depends on your knowledge, of course. 👍

[–] dreadbeef@lemmy.dbzer0.com 10 points 1 day ago (1 children)
[–] clay_pidgin@sh.itjust.works 1 points 1 day ago* (last edited 1 day ago) (1 children)

Lol, I am on chromium 138 and it still doesn't work!

Nevermind, it was vertical centering. I see. Progress!

[–] dreadbeef@lemmy.dbzer0.com 4 points 1 day ago (1 children)

horizontal centering is justify-content: center

[–] tensor_nightly69@lemmy.world 9 points 1 day ago (1 children)
[–] victorz@lemmy.world 2 points 1 day ago

Goes without saying.

[–] m33@lemmy.zip 29 points 1 day ago (3 children)

Oh dear, how long before CSS malware?

[–] WhyJiffie@sh.itjust.works 3 points 1 day ago

a few years ago I read an article about CSS-based fingerprinting, where they were using media queries to load specific tracking pixels. no JS required.

[–] bjoern_tantau@swg-empire.de 1 points 22 hours ago

Someone made CSS Minecraft. That was impressive.

[–] MadMadBunny@lemmy.ca 1 points 1 day ago

Don’t give’em ideas….

[–] CookieOfFortune@lemmy.world 18 points 1 day ago

The problem with CSS is that it’s not very intuitive and too flexible. You need to know how display and position works to understand the basic centering a div example. If you forget to change the display to flex you don’t get an error, it’s still valid CSS. You can examine the element in the browser but you’ll need to know to look for the issue there.

Then you’ll need to inline and block elements, etc.

And it’s a pretty unique system in general.

[–] Washedupcynic@lemmy.ca 7 points 1 day ago (1 children)

I learned to code CSS 25 years ago customizing pages in Neopets. It isn't hard to learn at all. I was 20 at the time with no coding experience.

[–] call_me_xale@lemmy.zip 34 points 1 day ago (1 children)

CSS now is... a tad more complicated than it was 25 years ago, FYI.

[–] Washedupcynic@lemmy.ca 1 points 1 day ago (2 children)

I still code. IF you keep practicing it isn't hard. The article made some great points about people that focused on JAVA and ignored other things.

[–] call_me_xale@lemmy.zip 12 points 1 day ago (1 children)

First of all, the article talks about JavaScript, not Java. Secondly, who writes "Java" in all caps?

[–] Goodlucksil@lemmy.dbzer0.com 3 points 1 day ago

Oracle, maybe

[–] WhyJiffie@sh.itjust.works 2 points 1 day ago (1 children)

let me get this straight. if we learn it 20 years ago, and we keep practicing, it's not hard, is that right?

[–] clif@lemmy.world 3 points 1 day ago

Life hacks. Get on board.

[–] sem@lemmy.blahaj.zone 5 points 1 day ago (2 children)

I have always been intimidated by CSS. Is a random background color possible without JavaScript? Like https://notpurple.com/ ?

[–] dreadbeef@lemmy.dbzer0.com 12 points 1 day ago* (last edited 1 day ago)

How timely a question: https://webkit.org/blog/17285/rolling-the-dice-with-css-random/

tl;dr: CSS is getting genuine random for exactly that soon

[–] feef@lemmy.world 2 points 1 day ago* (last edited 1 day ago)

(Not my code)

https://codepen.io/beben-koben/pen/eYPNew

You might be able to use this idea and set the animation to 0 seconds.

On second thought I don’t think it’ll work.

this was a fun read! I haven't done much web UI in years, so it was nice to learn about some of the new, nice things that are available. i don't think I'd remember some of the more advanced stuff though.

[–] zod000@lemmy.dbzer0.com 3 points 1 day ago

Nice to see posts from lobsters making it over here