Remix.run Logo
▲ agstudio 6 hours ago

Strongly agree. While I am a huge fan of the capabilities of native CSS and the fact that it keeps getting more capable as time passes, I have come to the conclusion that it is unfortunately a programming language trapped in an “obsolete stylesheet syntax” body, especially after the addition of calc(), variables, functions and multiple ways of conditional logic.

The worse part of working with CSS is that there is no standard static type checking tool (stylelint comes close though). A lot of programming errors should/could be caught at build time.

Sometimes wondering if a completely alternative syntax+tooling is possible that would leverage all the existing capabilities, while using a different language paradigm.

▲chuckadams 5 hours ago | parent [-]

The ironic thing is that the old-school ancestor to CSS already was a programming language: DSSSL was a dialect of scheme.

▲lioeters 4 hours ago | parent [-]

That DSSSL syntax looks a lot better subjectively.

    (element doc
        (make paragraph
            font-size:    20pt
            line-spacing: 20pt
            font-weight:  'bold
            color:        color-purple
            (process-children)))
In an alternate universe timeline, we could have had a single web language for hypertext, styles, and scripting.