Live data from Hacker News

My First CSS

engineering.kablamo.com.au

91–100 of 107 posts

Re: My First CSS

#91

Earlier quoted context omitted.

Expecting CSS to solve people on holiday is not the point, but expecting a technology to protect me from the much more general problem of other developers and content generators making mistakes is something I think you can blame on CSS. Going back to brundolf's point, he's arguing that you should try and take advantage of relative constraints as much as possible as CSS lets you do that. I'm arguing the opposite, and…

CSS is not a technology designed nor intended to protect you from anything. It's a technology that enables professionals to style web pages. And it's simple enough that even amateurs can accomplish much.

CSS is designed for professionals is the biggest ret-con I've ever heard. How much effort have developers spent adding basic functionality like scoping, modularity, and variables, features that are table stakes for any "professional" system? CSS was very much designed for amatures at the expense of professionals.

Second, to call CSS simple is insane. How many ways are there to create a positioning root? How many ways to create a stacking context. How many different things can using '%' as a unit mean in different context? CSS is incredibly complex. CSS tries to shove these important concepts implicitly away from the developers notice, only to ultimately make life worse for both amatures and pros.

Re: My First CSS

#92
post #87

Earlier quoted context omitted.

Canvas doesn't bring you do Windows/X11, Canvas brings you to a basic VESA driver where you're plotting pixels manually. You think the JS framework churn is bad now when all of those frameworks are just layers over HTML, just imagine the world we're looking at if everybody is writing their own full GUI framework to work with canvas. At least with JS framework hell everything is guarenteed to have the same output form…

> HTML5 and CSS are just bad tools for doing GUIs Is there something better? With Qt Widgets, the poster child for cross-platform GUI toolkits, I also frequently have problems with getting the layout to behave the way I want.

Android dev is better, iOS dev is better, heck even Tk layouts are better.

Re: My First CSS

#93
post #87

Earlier quoted context omitted.

> HTML5 and CSS are just bad tools for doing GUIs Is there something better? With Qt Widgets, the poster child for cross-platform GUI toolkits, I also frequently have problems with getting the layout to behave the way I want.

Android dev is better, iOS dev is better, heck even Tk layouts are better.

> Android

Not cross-platform.

> iOS

Not cross-platform.

> Tk

Decreasing mind-share for 2 decades+, not something I'd start a new project with.

Re: My First CSS

#94
I worked some years as a full stack web dev, and css was mostly what blew up my time needed. I recently built a small landing page and now I officially gave up on CSS. I just don't want it to be a part of my professional life anymore. I guess I lack some fundamental design and layout concepts but I don't want to fix this. I might as well run a bakery.

Re: My First CSS

#95
post #93

Earlier quoted context omitted.

Android dev is better, iOS dev is better, heck even Tk layouts are better.

> Android Not cross-platform. > iOS Not cross-platform. > Tk Decreasing mind-share for 2 decades+, not something I'd start a new project with.

Cross-platform and being a good tool are orthogonal concepts. We use HTML/CSS for GUIs IN SPITE OF their general unsuitableness because the value of easy distribution wins over developer sanity.

Re: My First CSS

#96
post #73
post #72

Why don't 's default to: "cursor: pointer;"?

I think the answer has to do with calls to action and the assumption users make that the cursor hand is a link to another web page or another part of the site, while not all buttons are hyperlinks. Probably not as much of an argument in these days, though, especially as most sites are single page applications where basically every button does indeed do some sort of reroute, target blank (new tab), or network call at…

HN barely even uses CSS. It's all tables, straight out of 1999.

Re: My First CSS

#98
post #93

Earlier quoted context omitted.

> Android Not cross-platform. > iOS Not cross-platform. > Tk Decreasing mind-share for 2 decades+, not something I'd start a new project with.

Cross-platform and being a good tool are orthogonal concepts. We use HTML/CSS for GUIs IN SPITE OF their general unsuitableness because the value of easy distribution wins over developer sanity.

> Cross-platform and being a good tool are orthogonal concepts.

I agree, but when I need to develop some software for Windows and Linux, a great toolkit for Android or iOS is of no use to me. Similarly, I won't use a Linux-only or Windows-only toolkit, as awesome as it may be, because I'm not going to build two different GUI layers.

Re: My First CSS

#99
This makes me very happy.

As a frontend engineer who started 15 years ago, learning the box model required a lot of knowledge of the internals of the browser. The times of having to know things like quirks mode, abusing overflow hidden [1], how to break the behavior of float, etc are long gone. This is great both for us having to struggle less, and for the newer generations to be able to tackle harder problems than just layout and build cooler stuff.

[1]: https://css-tricks.com/clearfix-a-lesson-in-web-development-...

Re: My First CSS

#100
post #86

I've known those things listed for 15 years now, and they did not help with the wack-a-mole problem. Especially not when working with multiple people. The only thing I've found to actually work is to keep things as simple as possible when it comes to your actual stylesheet. Any kind of complexity including some core CSS properties (e.g. the C for cascading) I avoid. My second box .foo is only slightly different so I…

I've also found atomic css, such as Tailwind, largely eliminates this problem. Yeah, a controversial opinion, but regardless of how you feel about utility classes, they do avoid this problem.

I used to be a bit of a CSS purist and I thought things like tailwind created a mess where some thoughtful and strategic thinking could prevent it. In reality, preventing the mess costs a lot of time and energy. I'd rather have ugly markup and get things done than have nice CSS. Our users don't give a single shit how nice our CSS is.

I'm on a team of 4 competent people who touch front end code, and despite our experience with it CSS is more of a recurring pain than anything else. We plan to make a slow migration to tailwind, essentially building new things with it and keeping our bespoke CSS in maintenance mode until it's replaced or retired. I'm looking forward to our ugly markup.

Post reply on HN