Hello I want to make a square div with length of sides equal to smallest side of parent div. I know it is possible to do with js, but I need to use only css; in js it would look something like this:
parentDiv.width >= parentDiv.height
? child.sideLength = parentDiv.height
: child.sideLength = parentDiv.width
in css I wanted to use "@when" to compare parent sides or at least its orintation, but I wasn't able to refer a parent's width, height or orientation. I know css isn't really meant to have any logical operations, but I belive there should be a solution to achive what I want
