#csshack — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #csshack, aggregated by home.social.
-
We make the background-size fit an integer number of times within the viewport width and height.
We need length division for that, so we use the tan(atan2()) hack by @JaneOri.
Then, we set box dimensions/ margins to be multiples of background-size https://www.reddit.com/r/css/comments/1gp4cq0/comment/lwqkyrd/Really cool thing is it works well on zoom, see it on @codepen
https://codepen.io/thebabydino/pen/ZEgwBqL#CSS #Maths #mathematics #cssMaths #cssPattern #pattern #cssGradient #code #web #dev #webDev #webDevelopment #coding #frontend #cssHack
-
We make the background-size fit an integer number of times within the viewport width and height.
We need length division for that, so we use the tan(atan2()) hack by @JaneOri.
Then, we set box dimensions/ margins to be multiples of background-size https://www.reddit.com/r/css/comments/1gp4cq0/comment/lwqkyrd/Really cool thing is it works well on zoom, see it on @codepen
https://codepen.io/thebabydino/pen/ZEgwBqL#CSS #Maths #mathematics #cssMaths #cssPattern #pattern #cssGradient #code #web #dev #webDev #webDevelopment #coding #frontend #cssHack