perbyhring / contain-box Goto Github PK
View Code? Open in Web Editor NEWA curry-function which returns width and height for a fixed-format child-element you want to contain inside a dynamic-format parent-element. Similar to the css-rule background-size: contain.