this post was submitted on 29 Aug 2025
214 points (95.3% liked)

Technology

85893 readers
4982 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 3 years ago
MODERATORS
 

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

Comments

all 42 comments
sorted by: hot top controversial new old
[–] clay_pidgin@sh.itjust.works 50 points 10 months ago (3 children)

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

[–] Sxan@piefed.zip 49 points 10 months ago
[–] dreadbeef@lemmy.dbzer0.com 10 points 10 months ago (1 children)
[–] clay_pidgin@sh.itjust.works 1 points 10 months ago* (last edited 10 months 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 10 months ago (1 children)

horizontal centering is justify-content: center

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

Goes without saying.

[–] victorz@lemmy.world 2 points 10 months ago

Depends on your knowledge, of course. 👍

[–] ironcrotch@aussie.zone 39 points 10 months ago

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

[–] m33@lemmy.zip 30 points 10 months ago (3 children)

Oh dear, how long before CSS malware?

[–] WhyJiffie@sh.itjust.works 6 points 10 months 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 3 points 10 months ago

Someone made CSS Minecraft. That was impressive.

[–] MadMadBunny@lemmy.ca 1 points 10 months ago

Don’t give’em ideas….

[–] CookieOfFortune@lemmy.world 19 points 10 months 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.

[–] technocrit@lemmy.dbzer0.com 17 points 10 months ago (1 children)

Clickbait. Actual less sensational point is in the text:

Not every site needs JavaScript.

[–] sugar_in_your_tea@sh.itjust.works 4 points 10 months ago

Exactly!

The one I build for work definitely does since we do things like manipulate 3D models. The majority of sites just present information and costs would go down significantly if they used a static site generator.

[–] addie@feddit.uk 13 points 10 months 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.

[–] alansuspect@aussie.zone 11 points 10 months 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.

[–] Washedupcynic@lemmy.ca 7 points 10 months 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 37 points 10 months ago (1 children)

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

[–] Washedupcynic@lemmy.ca 1 points 10 months 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 14 points 10 months 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 10 months ago

Oracle, maybe

[–] WhyJiffie@sh.itjust.works 2 points 10 months 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 4 points 10 months ago

Life hacks. Get on board.

[–] sem@lemmy.blahaj.zone 5 points 10 months 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 10 months ago* (last edited 10 months 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 10 months ago* (last edited 10 months 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.

[–] zod000@lemmy.dbzer0.com 3 points 10 months ago

Nice to see posts from lobsters making it over here

[–] madcaesar@lemmy.world 2 points 10 months ago

The only language worse than JS is CSS...