top | item 38656780

(no title)

Vanderson | 2 years ago

Advanced results require advanced skills.

CSS is one of my favorite languages. And the only way I can consider CSS to be difficult is if you have no experience with HTML. If you try to do HTML by hand, then doing CSS by hand on top of HTML by hand is really easy and wonderful. And this is truly where you gain the fundamental framework for "getting CSS".

discuss

order

marssaxman|2 years ago

My experience was completely the opposite. Learning HTML was effortless, and I had a great deal of fun writing pages by hand, easily creating whatever I could imagine through a straightforward hierarchy of nested tags. When CSS came along, it added a slippery, inconsistent layer of confusion where spooky action at a distance was the order of the day; nothing ever worked completely right, no matter how much time I spent grinding on it. I never could get comfortable with CSS and eventually gave up web development rather than continue fighting with it.

PointThink|2 years ago

Yeah CSS is a complete nightmare. Nothing works and you never know why. The only thing you can do is to randomly change attruibutes randomly until something happens. I remember working on a simple website and i had to do a gradient banner. The gradient was relatively simple but the true challenge was making it stretch edge to edge. No matter what i did there was always a little bit of padding or the layout was completely off. I don't even remember how i solved it.

anonzzzies|2 years ago

I have yet to find a frontender (and I have worked with 100s over the past 30 years) that can do any significant css without trying it out in a browser; if there is something off or needs to change on the frontend, very often the most experienced senior frontender can guess (and often a little bit right) what it is but to actually fix it they have to try a few times.

To me (someone who likes logic) that is a sign it’s all not very good. I can write a bunch of code on paper in several programming languages and even non web frontend frameworks and it will work after I type it in first time ; when it comes to web frontend, it has to be tried out to know it works as it likely will have issues (unless it has no css layouting of course or absolutely trivial prototype stuff).

smrq|2 years ago

It seems like you're not comparing apples to apples. Investigating someone else's code to alter it is always going to be harder than writing new code, even on paper in several languages.

I do think that CSS has enough footguns to say that arbitrary CSS is not very good; well-written CSS is a very small subset of CSS in general. It joins many other languages in that regard-- C, C++, Javascript, PHP, Bash, the list goes on and on. As in all of those languages and more, with some basic familiarity it's not hard to sling some fresh code together and have it do what you want. Making it scale maintainably is the hard part.

(For my 2 cents on the matter, the way to write Good CSS(tm) is using CSS modules to limit scope, using flexbox or grid for all layout, and being rigorous about creating stacking contexts when you need to modify z order. Application of these three rules has made my life as a senior frontend engineer generally quite easy.)

init2null|2 years ago

Handcoding/server-generation HTML running CSS via SCSS with no frameworks is a truly fulfilling experience. Especially if I get to mix in some SVG. I'm one of the few that outright hates JS, so I'm always glad when I get a chance to get back to my favorites.

yieldcrv|2 years ago

nah doing the same exact thing in CSS is like different every other year because someone invents a new attribute to solve the old friction

and its like what

and its like how is everything so compatible so quickly now

and why do I have to do it this way

and why does the interviewer expect this answer instead of last years solution to the same problem

I currently like tailwinds.

but dont ask me to set it up from scratch in a typescript project, but fortunately the bun runtime makes that simpler now, for now

eviks|2 years ago

Great design is precisely what allows lifting the requirements for advanced skills. Poor design resorts to manual editing of ugly markups