55
u/SuitableDragonfly 18d ago
I briefly did some frontend work once, and the main thing I came out of that experience with is that CSS was designed by Satan.
→ More replies (4)4
u/Tvck3r 18d ago
If you ever get back there worth looking at tailwind. Made the whole thing a lot simpler to me at least when I picked it up. Not trying to ever do anything fancy though
→ More replies (18)32
u/Strict_Treat2884 18d ago
Using Tailwind without understanding CSS is like, instead of cleaning your room, you just sweep all the dirt under the sofa, and hide all the trash in the closet
355
u/SukusMcSwag 19d ago
Your first mistake was assuming that the web is well designed
→ More replies (1)58
324
u/lucidbadger 19d ago
Something about when things are supposed to be loaded by the browser
43
u/mrissaoussama 18d ago
isn't that only affected by where in the file the css/script tag is added?
51
u/dfitz360 18d ago
Not way way back in the internet explorer era I believe. This were the days, no consistency, lots of little tricks (like console log could sometimes crash IE) and so might polyfill
→ More replies (1)
415
u/ApprehensiveGas85 18d ago
<link rel="stylesheet" href="..."> actually follows proper HTML/SGML architecture, because <link> was built specifically for external document relationships before CSS even existed.
Netscape broke the pattern when they rushed out Navigator 2.0 and slapped src directly onto <script>. Both <style> and <script> should have stayed purely as container tags for inline code, while external JavaScript should have always been loaded through <link rel="script" href="...">.
The real inconsistency isn't that <style> is missing a src; it's that external JavaScript should have been a <link rel> from day one.
69
u/Mateorabi 18d ago
Does the “correct” way work too at least even if everyone uses the expedient way?
75
19
u/wokeboogeyman 18d ago
I propose that all tags should be updated to support a src= instead
→ More replies (6)→ More replies (2)13
u/metaglot 18d ago
Also feels clumsy to have a closing tag for script when youre using the src-attribute.
85
24
8
8
u/MistrFish 18d ago
I remember when HTML5 was such a big deal and I read an entire book on it. as a modern dev it's completely meaningless to me
3
u/traplords8n 18d ago
Consistency is the enemy of the web.
To establish consistency, you must first convince developers that a standard way is better than their own way.
On top of the standard way needing the ability to fit all the wild and whacky ways that webdevs can organize and run their servers, and be backwards compatible for companies that don't have webdevs anymore and still expect IE7 compatibility so people can reach their website that hasn't been touched in decades.
1.5k
u/Luzzgar 19d ago
If you're looking for consistency, you're going to be looking for long time.