3 ms·
CSS object-fit handles your first two complaints, and CSS Variables handles your last one.
by pcwalton 10y ago
CSS object-fit handles your first two complaints, and CSS Variables handles your last one.
- Dylan16807 10y agoAren't CSS Variables just constants you can reuse? How are they going to let you set width to 80% and height to 2/3 of whatever that ends up being?
- pcwalton 10y agoBecause percentages in heights are usually relative to the width of the containing block.