1. 2
  1.  

    1. 1

      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.

      1. 1

        This breaks with non-sRGB colors like oklch(70.15% 0.352 328.24)

          1. 1

            ohhh it does indeed!

            getComputedStyle(document.body).backgroundColor
            'oklch(0.7 0.3 2)'
            

            let me see how else it breaks