News for hackers. Stuff that matters.
Re:Ask HN: Is it just me, or is CSS too damn hard? by aphextron on Monday January 28, 2019 @05:52PM (#19021866)
The 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. Things like QT can come close, but really nothing else is as as simple and easy to use while still being extremely performant and highly customizable. There's very very good reasons why practically all software nowadays has gone to HTML/CSS based UIs.
Re:Ask HN: Is it just me, or is CSS too damn hard? by jolmg on Monday January 28, 2019 @06:08PM (#19021989)
> 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.

Re:Ask HN: Is it just me, or is CSS too damn hard? by zapzupnz on Monday January 28, 2019 @06:17PM (#19022052)
> and there's no choice

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? by aphextron on Monday January 28, 2019 @06:30PM (#19022164)
>Give me springs and struts, Autolayout, or PowerApp's style declarative positioning any day.

Positioning is one thing, but CSS really shines in it's graphical abilities. Autolayout is fantastic, but have you tried writing the custom CoreGraphics code that is required to do anything outside of standard UIKit visuals? Not fun [0]. Being able to just type `background: linear-gradient(orange, green)` is a godsend compared to that stuff.

[0] https://github.com/amraboelela/myos.examples/blob/master/Cor...

Re:Ask HN: Is it just me, or is CSS too damn hard? by zapzupnz on Tuesday January 29, 2019 @05:16AM (#19025201)
Then I guess my dream system marries the two concepts, somehow. I don't think we should accept CSS just because it's what we have; far too many people find it confusing and dislikable.

At this point, I'm starting to look into things that "transpile" to CSS.

Re:Ask HN: Is it just me, or is CSS too damn hard? by alexis_read on Wednesday January 30, 2019 @04:53AM (#19033856)
IMHO I think that one of the main problems with CSS is that it doesn't have an explicit model of text. If you have that, then a constraint-based designer can take you through wizards to ask to to consider eg. When there's more text than space. Springs, struts etc. Can take care of layout. Controversially I think we should replace/remove div tags as they don't make all their behavior explicit vs flexbox/ cssgrid etc. Every object should have explicit layout behaviors defined. Then you can compose them or create new objects for undefined cases.