Active-CSS / active-css

The epic event-driven browser language for UI with functionality in one-liner CSS. Over 100 incredible CSS commands for DOM manipulation, ajax, reactive variables, single-page application routing, and lots more. Could CSS be the JavaScript framework of the future?
https://activecss.org
Other
42 stars 7 forks source link

Allow reactive HTML variables #260

Closed bob2517-whiteline closed 8 months ago

bob2517-whiteline commented 2 years ago

Currently only non-HTML variables are allowed to be reactive. Upgrade it to allow HTML variables.

Use case I have is a breadcrumb string with a fixed structure: home > cat > subcat > something

One way of doing it would be to assign each part to a variable containing HTML. That way the string could be drawn once as a string of reactive HTML variables and when something is clicked on the variables would only need to be the things that changed.

There are other (simpler) ways to do the same thing. I don't even need to do that method in practical terms - it doesn't matter very much at all in the grand scheme of things, but it sprung to mind as a solution and ACSS couldn't handle it.

bob2517 commented 8 months ago

Not working on this right now. There are security implications with changing what is there right now, and it would require a new syntax if done. Will come back to this if a use case is obvious beyond the theoretical.