Hacker News new | ask | show | jobs
by Uristqwerty 3096 days ago
With labels, hidden checkboxes/radio buttons, and some awkward CSS you can make no-javascript collapsible/expandable content, tabs, user-changable colour themes, and other horrible abuses of pure HTML+CSS. With :hover and transitions, you might even be able to make something turing-complete that runs automatically as long as the user's cursor is somewhere over the page! (last time I tried, a box that moved away from the mouse on hover, then automatically returned because it was no longer under it did not move endlessly unless there was an animation/transition on the movement. Could you have a clever way to send signals up the DOM heirarchy by altering the presence/absence of scrollbars or forcing a div to be wider, changing how elements layout with respect to cursor position?).

In those cases, it's certainly easier to use javascript, though.