Earlier quoted context omitted.
Interesting, I'll have to read about that. This has totally not been my experience.
It works great... for a while. Then you end up wanting to tweak something here and there, start adding classes to things, and you realize you want to do something that requires changes to the DOM within a component and you're screwed. Or you ignore the fact that the right way would be modifying the DOM, use some hacky CSS to kludge it, and you start getting browser inconsistencies. Either way you end up stuck with 10…
Ask HN: Is it just me, or is CSS too damn hard?
31–40 of 358 posts
Re: Ask HN: Is it just me, or is CSS too damn hard?
#32Re: Ask HN: Is it just me, or is CSS too damn hard?
#33Re: Ask HN: Is it just me, or is CSS too damn hard?
#34CSS can be fun. Its easy to learn but hard to master.
Be careful; if people recognize you know anything more than basic CSS, you’ll become the CSS helpdesk
Re: Ask HN: Is it just me, or is CSS too damn hard?
#35The thing with CSS is it's not a programming language. Progamming skills and CSS skills are almost completely orthogonal. It is simply a domain of practical knowledge that takes years and years of dealing with all the idiosyncracies, cross browser issues, and silly warts of historical legacy that come with it to master. That being said, it is without a doubt the most powerful and simplest layout tool in existence. Th…
> There's very very good reasons why practically all software nowadays has gone to HTML/CSS based UIs. One being that practically all software nowadays are webapps and there's no choice. For those that aren't webapps and whose GUI toolkit use CSS or something like CSS, it's probably to try to pull people that already have experience with webapps.
And this is the thing that many web developers miss. As they've begun to creep into the mobile and desktop space, intent on replacing native experiences with a continual barrage of non-native, bespoke apps, each with their own design, they've mistaken widespread availability with quality and utility — that HTML/CSS UIs are widely available is all to do with ubiquity and lessening an otherwise not-at-all steep learning curve, not technical merit.
Give me springs and struts, Autolayout, or PowerApp's style declarative positioning any day.
Re: Ask HN: Is it just me, or is CSS too damn hard?
#36>Incidentally, but very likely related, I always failed to have any glimpse into how design works. I have no idea which colors "go" with which ones, and pretty much all fonts look like the same for me. Yeah, you're not a designer. Note I'm not insulting you. :) CSS is very much like magazine or print layout IMO. If you're not used to that, it won't gel well. If you think of layout from a design perspective and _not_…
Can I be really predictable and give a "very different response"? Worked in magazines for years, still do a lot of print cartography, and I find CSS a completely different mindset to Illustrator or InDesign or Quark or whatever. It just feels like a weird outlier to me - not freeform enough to fulfil the "design" role, not programmatic enough to fulfil the "developer" role.
Re: Ask HN: Is it just me, or is CSS too damn hard?
#37Re: Ask HN: Is it just me, or is CSS too damn hard?
#38Re: Ask HN: Is it just me, or is CSS too damn hard?
#39The main thing that personally made it really hard for me is that I totally forgot about the first thing you learn in CSS: _Cascading_ - Coming from saner languages, the concept that what is written at the bottom of the file has more meaning than what's at the top of the file, or even worse that the file that is included later in the HTML has more meaning (without much scoping, and sometimes unintuitive specificity of selectors), seemed bonkers to me (and still does to some degree). Once I internalized that, that solved 50% of my CSS problems.
Apart from my anecdotal stupidity, one of the best resources I found was "Learn CSS Layout the pedantic way"[0].
Re: Ask HN: Is it just me, or is CSS too damn hard?
#40> I can't center my divs properly. This is actually pretty simple, once you understand how "block" elements work. Block elements will always try to fill up the "available width" i.e., they stretch side ways. The sum of margin + its width must match the total width. Inline elements will fill up its parent block like text. So, a simple example - suppose you set a div's width to 100px, and margin to auto, then you will…
I disagree -- in this and every case where someone has told me that something is simple once you understand the fundamentals. Understanding how a tool works is completely different from understanding how to use it to accomplish a particular goal. One's a deconstructive process, and the other is a constructive process.