this post was submitted on 19 Aug 2024
312 points (98.8% liked)

Programming

16975 readers
1288 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 100 points 1 month ago (1 children)

Oh wonderful! Another 10 years and we can use it natively without polyfills!

[–] [email protected] 43 points 1 month ago* (last edited 4 weeks ago) (4 children)
[–] [email protected] 35 points 1 month ago (4 children)
[–] [email protected] 4 points 1 month ago

Ah, that makes sense

load more comments (3 replies)
[–] [email protected] 4 points 1 month ago* (last edited 1 month ago)

~~Yeah, pretty much as Flex at 97% which is a nice comparison.~~

Edit: See mattd’s comment

[–] [email protected] 4 points 1 month ago (1 children)

Doesn't stop your manager from requiring support for the other 4%.

[–] [email protected] 8 points 1 month ago

Most websites these days refuse to support even Firefox.

load more comments (1 replies)
[–] [email protected] 65 points 1 month ago (9 children)

Why are we not angrier about css generally?

[–] [email protected] 59 points 1 month ago (2 children)

Because things were much worse in the beforetime

[–] [email protected] 44 points 1 month ago (2 children)

What, you didn't enjoy slicing up images and arranging them in borderless tables?

[–] [email protected] 13 points 1 month ago (3 children)

Eh the software handled all that. Rounded corners tho…

[–] [email protected] 13 points 1 month ago (1 children)

Rounded corners tho…

Just a small gif (as png didn't exist/widely supported) that had the rounded corner. Then if someone wanted to change the color or background you would have to redo all the images. Fun fun.

[–] [email protected] 8 points 1 month ago

Nah it's fine, we'll just do the whole website in Shockwave.

[–] [email protected] 4 points 1 month ago

WYSIWYG editors were evil

[–] [email protected] 2 points 1 month ago (1 children)

The software? Are you talking about Adobe ~~Dreamweaver~~ Dreamcrusher or something?

[–] [email protected] 3 points 1 month ago (2 children)

My money's on Microsoft Frontpage

load more comments (2 replies)
[–] [email protected] 3 points 1 month ago (2 children)

Please indicate where IE touched you.

[–] [email protected] 5 points 1 month ago (1 children)

*gestures broadly at entire body

load more comments (1 replies)
[–] [email protected] 2 points 4 weeks ago

In my faux column

load more comments (1 replies)
[–] [email protected] 48 points 1 month ago

I am blisteringly angry about CSS in general AND THIS FUCKING ISSUE IN PARTICULAR since 2005 at the very latest. Likely enough to up the average for several thousand people with only mild dislike for CSS.

If CSS had a church I would burn it down. In minecraft of course.

[–] [email protected] 37 points 1 month ago (1 children)

I would say because a) there are zero alternatives, and b) it's pretty powerful; you can generally do pretty much any layout even if it requires hacks, c) switching to something else is clearly infeasible so it's not worth even asking for.

Just have to live with it (on the web at least).

[–] [email protected] 37 points 1 month ago (1 children)

d) we remember the world before it was introduced

[–] [email protected] 9 points 1 month ago
[–] [email protected] 7 points 1 month ago* (last edited 1 month ago) (1 children)

CSS 3 is solid, mate. You can do just about anything with it if you know what you're doing.

[–] [email protected] 14 points 1 month ago (2 children)

Some of the pure CSS stuff I've seen is actually insane.

Obviously not actually for real world use, but a great example is https://github.com/kkuchta/css-only-chat

[–] [email protected] 3 points 1 month ago

With pseudo sectors, flex, and grid, your options are amazing. I haven't encountered a design I can't build in a very long time.

load more comments (1 replies)
[–] [email protected] 6 points 1 month ago

BaCkWaRdS cOmPaTiBiLiTy 😵‍💫

[–] [email protected] 5 points 4 weeks ago

What we were promised:

Content in one HTML document.

Styles in other CSS, able to apply any to completely alter the layout of the document.

What we got:

<div class="mt mid flex lt-8 no-margin up-1">

load more comments (2 replies)
[–] [email protected] 60 points 1 month ago* (last edited 1 month ago)
* { display: flex; }
[–] [email protected] 46 points 1 month ago (2 children)

Is it just me or is the irony lost on the author? It says "align-content: center" but it's only vertically aligned...

[–] [email protected] 17 points 1 month ago (2 children)

That's because under flexbox for horizontal alignment you use a different property called justify-content.

load more comments (2 replies)
[–] [email protected] 7 points 4 weeks ago (2 children)

Because we already have a way to center text horizontally...

load more comments (2 replies)
[–] [email protected] 28 points 1 month ago

Well that came like 10 years too late lol

I don't think I'll ever use it considering it was already easily possible with flexbox, and before that (although dirtier) with tables as well.

[–] [email protected] 18 points 1 month ago (1 children)

Well, we've been vertically centring content with no-trick pure CSS for years now, so, good I guess?

[–] [email protected] 4 points 1 month ago (1 children)

no-trick pure CSS

What do you mean? How else would you center content without CSS?

[–] [email protected] 16 points 1 month ago (1 children)

There were tons of options with multiple HTML elements with a sequence of CSS properties to reliably provide vertical centering (and also use vertical space at the same time) back in the days.

Now, between flex and grid (mainly flex for me, I find them more convenient) all the HTML scaffolding we used to make this work can be removed to get the same result. That's what I mean with "no trick".

load more comments (1 replies)
[–] [email protected] 7 points 1 month ago

It's worthless if you have to give it an explicit height, and also if it doesn't have support in all browsers.

[–] [email protected] 2 points 1 month ago* (last edited 1 month ago) (4 children)

Can we not do away with CSS/JS, learn from those mistakes and try something else? Pls, I beg you 🥺🙏

E: Sorry, forgot the /j Lighten up, Lemmy, not everything is a serious comment that needs your scrutiny or meticulous rebuttals.

[–] [email protected] 8 points 1 month ago (2 children)

What would you replace it with? There are lessons to be learnt from the web, but to "fix" it is much harder

[–] [email protected] 17 points 1 month ago (3 children)

Flash and applets. Let's just have a do over of the 90's and early 00's.

/s

[–] [email protected] 7 points 1 month ago

Nah, just back to Gopher and 5k baud. As an aside: Gemini is pretty awesome

[–] [email protected] 4 points 1 month ago

Frankly AS did a lot of things well

[–] [email protected] 3 points 4 weeks ago

Please! I miss my Action Script 3, not this cheap wannabe TypeScript 😭

load more comments (1 replies)
[–] [email protected] 5 points 1 month ago (1 children)

The first pass of elm ecosystem solved it. Before elm, it was also solved by other frameworks. But people wanted to be able to reuse their components and not rebuild new ones. React provided the ability to reuse css, and dirty js code in the middle of your application. You already had an way bigger ecosystem because you didn’t have to learn and built a complete new system again.

Personally if I had the choice I believe a new start should start at the browser level. Stop supporting HTML/CSS/JS. Create a new app-centric DSL and not a document centric one like html/css/js.

Ideally something inspired from cocoa layout. And I am dreaming but not accept generic code on the client side and only support a small controlled API. It would solve so many security issues. Sure, the creativity in such an ecosystem will be severely reduced. But we will have a so much improved UX.

[–] [email protected] 5 points 1 month ago

I get the reasoning but anything like that would just be abused to enshittify things further with unblockable ads and enforced DRM on everything. At least with the open standards there is the ability to adblock and manipulate certain annoyances at a browser level

load more comments (2 replies)
load more comments
view more: next ›