I don't think it helps that most of the CSS I've seen in the wild is vastly over-complicated.
Ask HN: Is it just me, or is CSS too damn hard?
211–220 of 358 posts
Re: Ask HN: Is it just me, or is CSS too damn hard?
#212I work as a frontend architect and UX lead (yes, it's tiring), and you're encountering a common problem. Javascript is logical (sort of...), and a lot like learning math. It's fairly easy to validate your output. It works well with the logical side of your brain. Learning CSS is a lot like learning English. There's the basic grammar, but also tons of edge cases, dialects, and straight up absurd rules (Buffalo buffalo…
> Javascript is logical (sort of...), and a lot like learning math. It's fairly easy to validate your output. It works well with the logical side of your brain. No, it really isn't. Some languages are, JS definitely isn't. It's mostly illogical / broken / mental.
Even if it were an argument I'm not even sure it would be an argument worth having because it's likely entirely orthogonal given the context of the original statement (i.e. contrasting JS with CSS and HTML -- where whatever esoteric programming language you're thinking of is not an option to begin with).
Re: Ask HN: Is it just me, or is CSS too damn hard?
#213Earlier quoted context omitted.
Good comment. CSS is actually pretty simple, as long as you start with the smallest elements and work up. It becomes a nightmare if you try and address everything individually. It’s not really a programming language, but a series of guidelines. I’ve seen this simplicity actually throw developers as they’re used to something much more complex and systematic. Preprocessors like SASS are great, but I wonder if they’re d…
Pixel perfect is not possible in HTML/CSS. Stop spreading this. But it is very possible to make websites look very good and inline with what was designed. But good luck making an input, button and select the same height. It's just not going to be pixel perfect. What is pixel perfect in your browser isn't in others. But what designers should now is it doesn't matter as long as it looks good for everyone.
Designers coming from print often get caught out when designing for the web as they tend to think of a webpage as a fixed layout, rather than a flexible system of components.
It's also important to understand where the design and development budget should be effectively spent. For example, unless there's a real business or usability reason for doing so, there's little point in trying to custom-style form elements like selects as doing so is difficult and time consuming and system defaults look better and provide a more consistent experience.
We demand pixel-perfect accuracy at work between design and code – but the developers must approve the designs first to confirm that it's achievable.
I guess it comes down to what we define as 'pixel perfect'.
Re: Ask HN: Is it just me, or is CSS too damn hard?
#214Earlier quoted context omitted.
Oh wow. I'd always just assumed it was a US idiom along the lines of yada yada or something. Buffalo buffalo... doesn't work in British English as it is only a noun. Nearest English silliness I can remember hearing is: police police police police.
Don't tell me you can't verb a noun in English English? "police police police police" - please...
Policing OTOH seems to be a fairly widespread verb form with a clearly understood meaning (i.e. what the police conceptually is supposed to be doing). Unless you have close experience with buffalo, you probably can't infer buffaloing means "intimidating".
EDIT: Also as mentioned elsewhere, not everyone outside the US knows there are places actually called Buffalo or makes that leap when hearing the word "buffalo". So "Buffalo buffalo" is more likely to be read as "buffalo(n) buffalo(v)" (which already sounds weird if you don't already know what "to buffalo sb" means) which breaks down as soon as you add more buffalo to the sentence.
Re: Ask HN: Is it just me, or is CSS too damn hard?
#215Re: Ask HN: Is it just me, or is CSS too damn hard?
#2161) CSS is for implementing designs; being able to use it doesn't require design sense for things like colors 2) I'm fascinated by the fact that so many of my fellow programmers - often the smartest ones - have so much trouble with CSS. I'm not sure exactly what the reason for that is, though I did write an article hoping to address it in some capacity: https://css-tricks.com/css-is-awesome/ I think part of the proble…
Re: Ask HN: Is it just me, or is CSS too damn hard?
#217Earlier quoted context omitted.
Don't tell me you can't verb a noun in English English? "police police police police" - please...
Of course nouns have been made verbs in English. You'll find no British English dictionary listing where buffalo is, unless noting US usage, where it is both. Police police police police is grammatically correct, but of little meaning : (the) police police(v) police (of) police (ie overseers of the police).
Re: Ask HN: Is it just me, or is CSS too damn hard?
#2181) CSS is for implementing designs; being able to use it doesn't require design sense for things like colors 2) I'm fascinated by the fact that so many of my fellow programmers - often the smartest ones - have so much trouble with CSS. I'm not sure exactly what the reason for that is, though I did write an article hoping to address it in some capacity: https://css-tricks.com/css-is-awesome/ I think part of the proble…
CSS is not a real constraint language. If it really were a constraint language, it would be better. There's no constraint solver. Just a bunch of rules applied sequentially. I'd like to have a real constraint system, like the one in Autodesk Inventor sketch mode. You select two things and apply a constraint - parallel, tangent, horizontal, collinear, etc - and the constraint system enforces those constraints. The lay…
> I'd like to have a real constraint system, like the one in Autodesk Inventor sketch mode
Here you go: https://gss.github.io/
> GSS reimagines CSS layout & replaces the browser’s layout engine with one that harnesses the Cassowary Constraint Solver
Re: Ask HN: Is it just me, or is CSS too damn hard?
#219I work as a frontend architect and UX lead (yes, it's tiring), and you're encountering a common problem. Javascript is logical (sort of...), and a lot like learning math. It's fairly easy to validate your output. It works well with the logical side of your brain. Learning CSS is a lot like learning English. There's the basic grammar, but also tons of edge cases, dialects, and straight up absurd rules (Buffalo buffalo…
> Javascript is logical (sort of...), and a lot like learning math. It's fairly easy to validate your output. It works well with the logical side of your brain. No, it really isn't. Some languages are, JS definitely isn't. It's mostly illogical / broken / mental.
Re: Ask HN: Is it just me, or is CSS too damn hard?
#220C++ and Python may be different from each other, but they're both imperative block-structured languages with a strong emphasis on time and happens-before.
SQL is set logic expressed as ABNF. If you want to write good SQL you have to let go of assignments that happen-before other assignments. Instead there are sets, unions and other concepts from logic.
Debugging javascript is a little different from debugging C++. Debugging SQL is fundamentally different.
CSS is like that. It's Jan Tschichold's design rules expressed using ABNF and has nothing to do with von Neumann machines. You might achieve Zen by reading one of Tschichold's books, and ignoring all of the syntax and tricks and howtos for a while.