Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@fruitfcker It’s the presentation layer for the content in the HTML. It was supposed to make styling pages easier while keeping content separated from how the content looks. But the browser wars, and standards wars, severely corrupted it. You can’t just center text or images. You have to write completely non-intuitive styling code to force the browser to do what a reasonable person would expect to be very simple.
-
C0D4669013yWe could all go back to tables and <font color = red> tags </font>🤷♂️
CSS "was" suppose to allow for removing styling from the dom and having a single source of truth and reusability, but like all things web based, it was abused and butchered and slapped across someone's face a few times to many before ending in the shit show we have today. -
MM8312243yRead up on CSS3. Flexbox basically fixes everything layout-wise, there are some measurements (v_, pr, ch) that are genuinely useful, media queries let you write custom rules for more or less any screen you care to specify…and I haven’t been stung by a browser war issue (other than inputs looking a bit different) for years now. Once I would have agreed with this, but I have to say that I think CSS is basically fixed now.
-
@MM83 I second this. Flexbox really changed my opinion about CSS. CSS is beauty now.
-
Also, I would like to summon @kiki here. I have heard they are some kind of lord when it comes to CSS.
-
Flexbox, Grid and calc() are awesome. The web is no longer just a collection of documents, it consists mainly of apps. As such, HTML+CSS needs to become a UI framework preferably with CSS being solely responsible for layout and looks so that the DOM can be constructed with indexing and accessibility in mind.
-
kiki353523y@Cyanide I’m not going to explain what a declarative language is to some php boubas that don’t know shit. If someone voluntarily wants to make a clown of themselves, I’m not gonna stop them.
-
@C0D4 But it's not like they flunked an easy solution. I thought about this quite a bit for my own interface thingy and I can't for the life of me figure out what the relationship between content, layout and style should be. From that perspective CSS is actually quite a good solution for what it is
-
@12bitfloat I always wondered how and whether a declarative layout engine could be based on describing positions and sizes in relation to one another and then having an equation solver compile the result.
-
@lbfalvy MacOS actually does it this way IIRC using the Cassowary constraint solver. It solves some things (pun intended) but CSS has way more problems than just that (and adding a inequation solver might just add more incomprehensible weirdness)
-
hinst12993yOk so since you suggest that CSS should be cleaned up... I would like to know what would be the first CSS keyword you would like to remove from CSS spec
Cause, you know, ppl often say "it is crap" but cannot come up with anything better 👌 -
@hinst To be fair, you can say a meal is aweful without being a chef. That said, I do actually agree. CSS gets a bad name because it is trying to solve a problem that doesn't have a good solution
-
@12bitfloat I hope it has a good solution, but the problem is inherently hard, good solutions are necessarily complex and operate with a high entry barrier and most complaints against CSS stem from people refusing to learn it.
-
CSS is actually a good idea, except that many people have never understood even the basic concept, as witnessed by all those "CSS frameworks" that basically re-introduce the 1990s way of polluting the structural markup with presentational shit.
Centering looks difficult until you answer yourself one critical question: centering within what exactly?
That's also why vertical centering is more difficult, because that's what it is. This isn't a sheet of paper, this isn't desktop publishing for a flyer. This is the web where the vertical size is potentially infinite, that's why we have scroll bars. -
kiki353523y@stackodev do you want to know what was really the worst idea ever? you choosing to be a software engineer. Just quit.
-
@Fast-Nop But since the web is now an application platform rather than a document viewer, there's no reason why vertical space should be unlimited. Usually when making a webpage we're very conscious about where the scrollbar is and there are several independently scrollable elements as well as a fixed frame. I think CSS is a really good approach, but some of the defaults simply suck.
-
kiki353523y@lbfalvy are you done yet talking about the web growing into an application platform? We get it!
-
@lbfalvy The vertical space is always unlimited. That's how a browser works. If you want it limited, then you must limit it yourself, in which case you have a container, in which case you can centre within that container. It's not rocket science.
-
kiki353523y1/2 @stackodev sorry, my latest comment about you was written impulsively.
You see, CSS is amazingly, astonishingly beautiful. It cannot produce runtime errors. It achieves perfect separation between presentation and logic, just as Steve McConnell wanted, though it allows you to break it with pseudoelements if you need to.
CSS can't produce runtime errors, and it doesn't even need a compiler to achieve that. CSS is amazingly performant — it enables you to do amazing things with just a few lines of code, and it only really lags when the problem you're trying to solve is algorithmically complex. In that case, you can't go faster than CSS in vector, the only thing that would be faster is to go scalar and use WebGL.
In CSS, line order doesn't matter — they all apply together. To solve overrides, CSS introduces the amazing concept of specificity. -
@kiki It's not my subject, it's my argument. I'm talking about unlimited vertical space being a unique property of bodies of text larger than the screen - something that Twitter for example explicitly avoids.
-
@Fast-Nop I know that's how the browser works, my point is that that's a really stupid assumption for a GUI engine to make about the app.
-
kiki353523y2/2 I have a computer science background. I've seen Haskell, C, Clojure (and Lisp), Prolog and other innovative languages. Still, CSS is my favorite programming language (yes, it's a programming language) by far, and the only thing that comes close is probably Lisp.
Do you know why?
Because CSS is only as complex as its domain area. It introduces the thinnest overhead I've ever seen. That's the pinnacle of software engineering.
CSS is also dead specific and precise, just a fucking katana blade like C. If you write "transition: all", it will animate fucking ALL of it, even the process of resizing textarea with a mouse.
Precise things usually require you to be extra careful. There are things that allow you to be sloppy, but they are not that precise. -
kiki353523y3/2 Just as with C, with CSS you have to be careful, and while achieving this level of precision, CSS ALSO allows you to be sloppy. CSS changed how I think of programming entirely. I even met Hakon Wium Lee, the CSS creator, to thank them in person.
So now go and read some books on tools you're fucking using, whatever they are. Maybe then you'll understand. -
@lbfalvy The main problem isn't using a container, it's that many web devs lack any sort of structural thinking or even basic knowledge of HTML. They can't really see beyond "pixels on the screen" as if they were doing shit in MS Paint or so.
-
@kiki I was a CS major who switched to business IT because of dyscalculia which afflicts me with general “bad at math” issues, terrible short term/working memory as well as long term recall of complicated algorithms, structures, syntax, etc. Every bit of programming I do is excruciatingly slow compared to others and necessarily involves me looking up and re-looking up stuff most people have no problem remembering. My rant was after a whole day of attempting to get a bunch of decorative lines to behave themselves responsively on a design where nobody would care if those lines never existed. I want it to be easier because I need it to be easier, not because I’m lazy. And I wish there were something easier for all the “everyday” folks who try to roll their own websites but fail hard when CSS comes into play.
Just my 2 cents. -
kiki353523y@stackodev check out tailwind. Also, forget about setting width and height in pixels. Use paddings instead.
Your website will become responsive almost instantly. -
@stackodev It is easy. HTML has always been responsive from day 1, except tables of course. If your self-rolled website isn't responsive, it's because you coded some CSS to break responsiveness. You did it.
-
MM8312243y@stackodev an hour reading about CSS3 will ease much of your pain. No idea what you did to warrant the aggression there, it did used to be a mess and it still has that reputation.
-
kiki353523y@Fast-Nop if the prerequisite is "I don't want to learn CSS", tailwind is fine. Though I share your emotions on CSS frameworks overall
Related Rants
CSS is the worst idea ever.
Ok, maybe it started out as a good idea.
But now it’s just a big pile of diarrhea that nobody knows how (or wants to) clean up.
rant
css sucks