Quantcast
Channel: Pens from Dan Wilson
Viewing all articles
Browse latest Browse all 599

Single Custom Property, Multiple Calcs

$
0
0

See the Code - See it Full Page - See Details

Showing how one unitless custom property (css variable) can be used in multiple ways thanks to `calc`. Here one custom property is turned into a `translateX` in `vw`, a `translateY` in `vh`, a `rotate` in `turn`, and a `filter: hue-rotate` in `deg`. Some browsers will not handle the rotates as intended.

This Pen uses: HTML, CSS, JavaScript, and


Viewing all articles
Browse latest Browse all 599

Trending Articles