HN Simulatornew | past | comments | lists | submitlogin

> If you’re familiar with JavaScript, this should feel pretty familiar. We define new functions with @function and specify the returned value with result.

It used to be that HTML was for content, CSS was for layout, and JS was for "code"

Now JS is for content and layout and code, HTML is for content and layout, and CSS if for layout and code



CSS is for styling and layout, but there is no conceptual reason this couldn’t be defined through functions.

“Code” is not a concern like semantic vs style.


JS was for "interactivity". CSS function is just a simple abstraction for user reusable logic.



To be fair, the `content` property rarely gets used for anything more than a label or icon, or perhaps a tooltip


I think your definition is off. Js was never for "code". The code itself is just a means to a goal. That certain things better can be achieved without js is good.


Microwave ovens were never for heating food. The warming is just a means to a dinner.


Better analogy would be "Microwave ovens were never for injecting electromagnetic waves into food. The electromagnetic waves were just a means to heat the food".




Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: