News for hackers. Stuff that matters.
Re:Ask HN: Why there are no languages that translate to CSS? by MildlySerious on Thursday December 17, 2020 @07:06PM (#25462203)
It's quite the stretch I know, but for me, on a practical level the answer to getting something better than CSS was Tailwind.

In the biggest project I currently manage, the custom CSS I wrote boils down to maybe 150 lines total of: custom fonts, some ::before/::after styles and styled tags inside a markdown section using @apply. Everything else is just classes in components.

Re:Ask HN: Why there are no languages that translate to CSS? by taphangum on Saturday December 19, 2020 @05:13PM (#25481747)
100% this.

What OP seems to be looking for is just a higher level of abstraction. So that there's less repetitiveness.

That's exactly what Tailwind does. And does VERY well.

Re:Ask HN: Why there are no languages that translate to CSS? by lgas on Thursday December 17, 2020 @05:34PM (#25461404)
Re:Ask HN: Why there are no languages that translate to CSS? by mrwnmonm on Thursday December 17, 2020 @05:47PM (#25461540)
Yes, this is kind of what I am talking about. Thanks for the link.

But we should have more, and better ones. I didn't sit down and think about how it would be, I was just curious why we didn't go that path already, if a lot of people don't like CSS.

Re:Ask HN: Why there are no languages that translate to CSS? by Normille on Thursday December 17, 2020 @05:37PM (#25461441)
{less} [0]

[0] http://lesscss.org/

Re:Ask HN: Why there are no languages that translate to CSS? by mrwnmonm on Thursday December 17, 2020 @05:44PM (#25461509)
Man, it literally says "It's CSS, with just a little more." That is not what I mean. I know about less and sass already.
Re:Ask HN: Why there are no languages that translate to CSS? by Normille on Friday December 18, 2020 @01:18AM (#25464401)
You also used Typescript vs Javascript as an example of the kind of thing you were looking for. Since TS just 'adds features' to JS, I think the comparison with CSS / Less is valid.

Also "everyone hates CSS" is a bit of an unfounded and simplistic statement to make and may be why a couple of us thought you were asking a pretty uninformed question.

[dead]
Re:Ask HN: Why there are no languages that translate to CSS? by Normille on Friday December 18, 2020 @04:16PM (#25472148)
I rest my case
Re:Ask HN: Why there are no languages that translate to CSS? by mrwnmonm on Saturday December 19, 2020 @02:10PM (#25480189)
°_°
Re:Ask HN: Why there are no languages that translate to CSS? by fmo91 on Thursday December 17, 2020 @05:23PM (#25461312)
I'm an iOS Engineer so maybe I'm wrong, but doesn't SASS already do that?
Re:Ask HN: Why there are no languages that translate to CSS? by mrwnmonm on Thursday December 17, 2020 @05:30PM (#25461369)
No, it introduces more features, that all.