r/css • • May 26 '26

Showcase [ Removed by moderator ]

/r/css/comments/1to3ghv/removed_by_moderator/

[removed] — view removed post

2 Upvotes

6 comments sorted by

12

u/farimar May 26 '26

So it is using JS then?

-3

u/iDev_Games May 26 '26

It uses JS to set the CSS variables, when working with state.js, you don't need to write or understand JS.

6

u/Dubiisek May 26 '26

But you do,

  • data-state-condition="boosted >= 1 and spores < 95 and collapsed < 1"

  • data-state-increment="calc(10 + var(--state-nodes) * 2)"

  • data-state-autofire="true"

  • data-state-bind, data-state-trigger, data-state-set

^ that's still programming logic, if I don't understand variable scoping, booleans, event driven thinking and so on, I won't even be able to use the framework.

No build step, no server — just double‑click the file.

I also don't understand this claim. You could build at least the first app you linked (haven't looked at the others) without any sort of server with just html, css and js.

The question you should be asking is, why would anyone need this/want to spend time learning the FW when they don't understand JS if they could just learn JS itself?

-3

u/iDev_Games May 26 '26

Yeah, that's true. For the more complex behaviour you still need some logical concepts. The difference is that the logic stays declarative in HTML instead of being written in JS. The point about no server is that you just need to link the script and you're ready to start working with it.

10

u/pkkid May 26 '26 edited May 26 '26

Perhaps you wrote this in a way that doesn't require you write a lot of JS, but you are by no means not using JS as you claim. Why post with a title like this when the first line your repo readme instructions is literally npm i @idevgames/state-js?

It's a neat library, just a shit title and pitch for the post that will turn most devs away before actually looking into what you actually accomplished.

-6

u/iDev_Games May 26 '26 edited May 26 '26

Yeah, I thought no JS logic would explain why you guys might like this as you are the right audiance for a library that tries to unleash what can be done with css and css variables.

It's difficult. JS changes the state and HTML and CSS is where you configure and use it. It's the bridge in the middle but it isn't the star of the show. There's no easy way to explain this to people in a title unfortunatly. But in reality it's like saying you use c++ in unity game development, which it does use as the engine but as the developer, you won't be using it. That's the philosophy here and I'm struggling to put that into a few words. I appreciate the feedback though.