Skip to content

resolveAppearance()

Function@tryyoursize/sdk

Resolves what the windows receive: for “inherit”, the font, text colour and background where the element is mounted (buttons use the text colour, the way most stores style their primary button); explicit variables always win.

function resolveAppearance(mount: Element, input: Appearance = {}): Appearance
mountElementRequired

The element whose computed style is read.

inputAppearanceOptional= {}

Your appearance; explicit variables win.

Appearance: The appearance our windows receive.

import { resolveAppearance } from "@tryyoursize/sdk";
console.log(resolveAppearance(document.querySelector("#size-guide")));

Was this page helpful?