Web development
fromDEV Community
5 months agoString3D: Forcing 3D to Obey CSS
String3D binds 3D objects to DOM elements, rendering in a canvas overlay and controlling transforms via CSS custom properties synchronized each frame.
Sometimes I want to set the value of a CSS property to that of a different property, even if I don't know what that value is, and even if it changes later. Unfortunately though, that's not possible (at least, there isn't a CSS function that specifically does that). In my opinion, it'd be super useful to have something like this (for interpolation, maybe you'd throw in there as well): /* Totally hypothetical */ button { border-radius: compute(height, self); border-radius: compute(height, inherit); border-radius: compute(height, #this); }