3 ms·
It isn't just you. I work on systems software - kernel, daemons, networking, debuggers, machine language disassembly - so I'm used to looking at things which o
by suprjami 4y ago
It isn't just you.
I work on systems software - kernel, daemons, networking, debuggers, machine language disassembly - so I'm used to looking at things which other people say are "hard".
Nothing frustrates me more than writing a Stylus rule or figuring out how to place an element on my Jekyll theme. Every time I do this, my appreciation for modern well-made websites doubles.
CSS is so opaque and impossible, I wouldn't be a web developer for any money.
- zamadatix 4y agoThe hard part about working with CSS is that, beyond syntax, nothing is an error. No matter how far it is from doing what you intended to do it's always going to give you a layout with no hint how it's actually different from what you wanted beyond "that doesn't look right".
- epicureanideal 4y agoBut is that very different from code with logic bugs despite correct syntax? The solution for code is unit tests. Maybe the css needs that also.
- zamadatix 4y agoIn code it's very easy to add your own errors/asserts which say "you dummy, you can't possibly fit these 3 things here the way you want" and then go modify your code so you can handle it the way you wanted. It's worth testing because when a test breaks you can modify it so the test passes. In CSS you can't customize that latter half though, if the 3 things render wonky when they don't fit you just have to hope there is some way to tell CSS to render it the way you want. Sure, you can run a test that says it failed to create the layout you were hoping for... but you already knew that and test or no test your only hope is you can find some way to do it with the predefined options in CSS. And the fun part is sometimes there is no way! You may just have to compromise on how your layout works or push some logic to JS to change the styling so you can do something more akin to the normal code way (at the loss of performance and clarity).
- satvikpendem 4y agoThat's simply because you haven't learned it properly. For example, I went through a course that taught CSS from the ground up [0] and I am now able to write any CSS I need to, and I can generally debug CSS issues a lot faster. The problem is most devs, even on the frontend, learn CSS incidentally, not from first principles, so they get annoyed when they can't do stuff. I mean, yeah, if you don't learn something properly of course it won't work as you expect. It's the same as me not understanding Docker until I also learned it from the ground up. [0] https://css-for-js.dev https://css-for-js.dev