r/HTML • u/MaganBall • 2d ago
Discussion Opinion about CSS
honestly, inline css proves that css regular doesnt need to exist, just use inline.
7
u/mondayquestions 2d ago
And then you make a small modification to how your buttons look and have to update hundreds of buttons’ inline styles across dozens of files.
Good luck changing your color palette too.
-6
u/MaganBall 2d ago
find & replace
6
u/Rockafellor 2d ago
Inline is more convenient in some ways, such as small pages when one wishes to drop-in only a few things, but keeping an external sheet makes projects much easier to manage when one needs a sweeping change to the ids and classes.
5
u/azangru 2d ago
honestly, inline css proves that css regular doesnt need to exist, just use inline.
How long have you been learning CSS?
0
u/MaganBall 2d ago
does it really matter?
1
u/azangru 2d ago
Yes. Normally, over time, you learn what inline css can do, and what it can't.
0
u/MaganBall 2d ago
well im pretty sure ik everything and I can say that inline css is better, its truth bro, ion know what to tell ya?
5
u/omysweede 2d ago
Oh, you young ones, and your complete inability to learn from previous generations. Let me give you another idea: instead of using CSS, just use tables. Use transparent GIFs for positioning. Make the links open in popup windows. Use animated GIFs with text instead of real text to make it look cool.
Congrats: you now have an unmaintainable website from 1996.
Learn CSS, young grasshopper, especially the cascading part of it.
1
u/Rockafellor 2d ago
Man, that brings back some memories. For transparency, I have to admit to a certain fondness for tables (I know their weak points are... well, bad, and I can't really defend them well; I can only say that something about them appeals to me — that said though, I have no wish to return to the eye-bleeding '90s web designs 😆).
0
u/MaganBall 2d ago
Ion know what gave ya that impression but ig in your years of experience ya just haven't figured out that inline is better, smh
3
2
u/uncle_jaysus 2d ago
When you say "inline", what specifically do you mean? Sometimes, people say this and mean having the CSS on the page in <style> tags. Other times they mean on a per-element basis, such as <div style="display:flex;">
The former is good if you have a method for managing it. The latter is madness.
-1
2
u/Aggressive_Ad_5454 2d ago
With respect. Your headline is a true statement. That is, certainly, an opinion about CSS.
2
u/Donkey_Bugs 2d ago
Extremely bad practice. You must be trolling.
1
u/MaganBall 2d ago
guess ya've been practicing wrong
1
u/Donkey_Bugs 2d ago
Bloated, unmaintainable code, yeah that’s best practices alright. Web standards, who needs ‘em!
1
2
u/Donkey_Bugs 2d ago
Don’t stop at inline CSS, use deprecated tags, too! The FONT tag needs love, and don’t forget BLINK. Use that one all over the place to command user’s attention (or give them a seizure)
1
1
u/deceze 2d ago
Because you want to repeat the same styles over and over for each element? And if you decide you'd like your headers/headlines/paragraphs/whatever with 1px more margin after all, or have your links in pink, you're going to change it on every element on every page?
-2
u/MaganBall 2d ago
have you heard of find & replace? its a pretty cool tool
7
u/deceze 2d ago
Have you heard of external style sheets? They're even cooler.
0
u/MaganBall 2d ago
wastes bandwidth making you have a separate file the site has to parse thru, and wastes text in <head> with <link>, plus the burnout of opening up a separate file.
5
u/deceze 2d ago
You must be trolling. Repeating the same styles over and over wastes a ton more bandwidth and text than downloading and caching a shared stylesheet once.
0
u/MaganBall 2d ago
ion know man, my experience? Pretty fast, gotta tell ya
4
u/omysweede 2d ago
I don't believe you have any experience. I don't believe you are old enough to shave.
1
u/phn-cloudsnake 2d ago
Are we not doing DRY anymore, I’m used to keep things organised using frameworks and pre-processors. Next thing you tell me vanilla JavaScript and jQuery is all you need, everything else is just bloat
1
1
0
10
u/pacdude 2d ago
This has to be bait, no real designer can be this fucking stupid