logoalt Hacker News

smusamashahtoday at 3:19 PM4 repliesview on HN

As an aside but still relevant question, why is CSS preferred over JS when these days it can do lots of things like JavaScript and probably uses similar resources.


Replies

Minor49ertoday at 3:39 PM

CSS and JavaScript specialize in two very different areas and are commonly used in tandem

soperjtoday at 4:04 PM

You can do layouts with javascript?

Couldn't imagine ever wanting skip grid and flexbox for whatever has been concocted up for JS.

show 1 reply
k33ntoday at 7:02 PM

1. This isn’t CSS. It’s a declarative JS drawing framework with CSS flavor to the syntax

2. Without actual CSS JavaScript wouldn’t be of much use for drawing much of anything unless you were just going to use canvasses and forego the DOM entirely

sublineartoday at 5:21 PM

I agree. This seems like it would make more sense as a canvas library unless there's a use case I'm not understanding.

show 1 reply