3 ms·
Html and css are not hard; at least I’m aware of each topic listed at this site and either know it or know where the good reference is. The problem is that they
by wruza 7y ago
Html and css are not hard; at least I’m aware of each topic listed at this site and either know it or know where the good reference is. The problem is that they are full of legacy, incompatibility, sometimes irrationality, they lack details and proper isolation.
For one simple example, give body 100vw 100vh and gray, vue #app 100%. You have just a gray page, right? Pretty trivial. Okay, now add h1 into #app. Page suddenly gets a vertical scroll of ~10px and a white bar of the same height appears above body. Why?
Because h1’s margin leaks through two parents up to the document’s top, document pushes body down that count of pixels, but retains its 100vh height. That’s completely absurd and entire html/css is drenched with this absurdness. You cannot find this behavior in layout systems of traditional desktop frameworks. And this one is just a trivial case leading to a problem. IRL a production-ready site is a tetris-inspired pack of properties set on :first/last-childs, 1-2px fixups for baselines, borders, etc that correspond to required design. Changing parts of it without messing up is so hard that css guys who I know always try to fix design at the beginning and cringe every time changes are made. They also try to apply rules only on specific divs and clear it for childs, trying to isolate effects. And then I read “CSS is Awesome” in yet another popular blog post and something dies in me at that moment.
I look forward on things like gss, manual positioning via js, etc. But then comes seo and tells that he requires wordpress and semantic cr%p and that google will not give a damn about pages built my way. /rant
- cameronbrown 7y agoDidn't you just prove CSS was hard?