I don't get it. I mean, yeah I get wanting to make extremely minimal web pages that are readable on every screen. But if that's your goal, the solutions are pretty well understood. Who's the target audience for this, i.e. who are the people who are trying to make a bare bones web page but just struggling with `max-width` - and why's it at the top of HN?
Me. I'm a backend developer who occasionally wants to make a web frontend for a side-project but knows essentially no CSS. The solutions are not "well understood" by me because I know no CSS.
In that case I'd say the problem is exactly what you state
> knows essentially no CSS
The solution is quite obvious then too: learn some. It's not hard. Understanding the basics is a afternoon job. Diving a bit deeper a day, and learning about some often-used more in depth features like "responsive" or flexbox, another day. For a software developer/engineer that builds backends, CSS really isn't that hard.
That's not to say a basic CSS set and some explanation like in TLA, isn't useful.
It's my pet-peeve that in software development, I'm convinced we should understand the stuff that we work with. Not all, and certainly not everything in great detail, but enough to know where to find the info and details when working with it. From sysadmin to the concepts of cryptography and from accessibility to how an OS writes stuff to disk. Even if that means constantly learning.
> The solution is quite obvious then too: learn some.
That’s the whole point of this article. CSS is a huge language. Where do you even begin? This article is a perfect response to that very natural question.
It really isn't a huge language. It's not even a language. There are some basic principles, but it's pretty much a bunch of pick-and-choose attributes for HTML that you can wrap up into "classes". I've worked heavily with it for 25 years and I still basically just screw around until something looks good.
There is no point to this article. This is the most common kind of trash you can find if you type in "minimum css"... it's not even that. Come on. Have integrity in your work and learn how to do it.
It's a declarative language, not an imperative/functional language. You describe the desired end result, the browser figures out how to lay things out to fit all the constraints.
And this:
> but it's pretty much a bunch of pick-and-choose attributes for HTML that you can wrap up into "classes".
indicates despite using it for 25 years, you haven't even tried to learn it. This may have been partially true back when it was first introduced and all people knew were things like "font" and "[text-]align", but it's been a horribly inaccurate description of CSS for decades now.
C'mon. I'm a full stack dev but this is like me saying I just want to code something quick in C++ but don't know anything about it. Maybe I don't know how to tell a pointer from a shared_ptr or what a destructor is. Even if I don't know how to do them, I'm pretty aware that these things are very well understood and documented by a huge community, to the point that I probably wouldn't rely on some AI-written article with almost no useful information to show me how to do what I wanted to do... I'd want to actually learn what was going on under the hood... and if I did somehow find such an article useful to explaining pointers in the most vapid way possible for my use case, I certainly wouldn't post it to HN. And if I did post it to HN and it suddenly ranked to the top, I would think something had gone completely wrong with the universe.
It's an objectively terrible article. It gives a bunch of arbitrary things to copy without really explaining them, and it is completely useless for building anything real. It is probably written by an AI. It's trash. What on earth makes you think it deserves more attention than the other million useless articles on this subject?
If you want to make a personal website, you have two routes: Use a template thing like wordpress, with a GUI, or learn at least a bare minimum of HTML, CSS and probably some Javascript, as well as how to set up a server. What's offered in this article is not very useful to making a personal website... it's like if you wanted to bake a cake, and you read an article saying that frosting is made from sugar and butter. This isn't news and it's it's not particularly useful to baking your cake either.
Just to like, follow up: 99% of the point of making your personal website is, like, making it fucking personal which is to say that you put your own time and energy into learning something in the process. Copy/pasting random CSS from the web is not learning. Also, copy/pasting this particular CSS is not even showing the slightest bit of interest.
So consider: Why would anyone care about your personal website if you don't care enough to learn how to make it, you know, personal by actually learning a tiny bit about the art you're trying to put into practice?
And none of this even starts to explain why this junk would be popular here. There are some brilliant CSS hacks in the wild that deserve attention, but this is sub-par even for child's play that might teach you how to do something useful. It's not even a lesson. It's just some crap you don't understand that you might copy and paste, with almost no explanation.