I really like this solution! I imagine you can extend it to use other css properties as well, perhaps to change the dimensions of the 3D element based on a property that changes with a media query. That way all the variables to do with your responsive layout can live in CSS.
I really like this solution! I imagine you can extend it to use other css properties as well, perhaps to change the dimensions of the 3D element based on a property that changes with a media query. That way all the variables to do with your responsive layout can live in CSS.
This breaks with non-sRGB colors like oklch(70.15% 0.352 328.24)
Added an appendix. Good catch!
https://www.nmattia.com/posts/2025-01-29-shader-css-properties/#appendix
ohhh it does indeed!
let me see how else it breaks