signature(demoFunction, {
description: `Scales dimensions proportionally to fit into the given width and/or height.`,
example: `const [width, height, scale] = scaleContain(img.naturalWidth, img.naturalHeight, 500, 500);`,
css: `
${signature_theme}
:scope {
background: LightYellow;
box-shadow: 1px 2px 5px -3px;
font-family: sans-serif;
}
:scope .description {
font-size: 1.2rem;
font-style: italic;
}
:scope .examples .code {
background: NavajoWhite;
}
`,
})