Why are margin/padding percentages in CSS always calculated against width? (stackoverflow.com) 2 points by Leftium 10mo ago ↗ HN
[–] Leftium 10mo ago ↗ I discovered this CSS oddity while trying to figure out why my plan to use (negative) margins to create a new "effective" content box wasn't working with percent units (but worked with other units).The best explanation seems to be in the middle of this article: https://www.aleksandrhovhannisyan.com/blog/css-aspect-ratio/...
1 comment
[ 4.2 ms ] story [ 11.1 ms ] threadThe best explanation seems to be in the middle of this article: https://www.aleksandrhovhannisyan.com/blog/css-aspect-ratio/...