/** Explicit layout context used to resolve relative CSS lengths. */ export interface ResolveCssLengthOptions{readonly host?:Element;readonly percentBase?:number;readonly viewportBasis?:Window|Readonly<{inlineSize:number;blockSize:number;}>;} /** * Resolves a CSS length to pixels against explicit layout context. A `rem` value tracks the * document root font size, `em` tracks the supplied host, `%` uses `percentBase`, and `vw`/`vh` * use `viewportBasis` (or the host document's live viewport when no basis is supplied). * * Note this is a `@container` query's rule, NOT a `@media` query's: inside a media query, relative * units resolve against the browser's *initial* font size and ignore any `html { font-size }` * override entirely. The two agree only while an app leaves the root font size alone. Callers that * need real media-query semantics must hand the authored length to `matchMedia()` and let the * browser resolve it, rather than converting it here first — see `OrientationBreakpointController`'s * `'viewport'` basis. * * Accepted forms — the ones that mean something as a *layout breakpoint*: * * - a bare number, or a numeric string, in px (`900`, `'900'`) — the historical form; * - `px` (`'900px'`), identical to the bare form; * - `rem` (`'56.25rem'`), resolved against `document.documentElement`'s computed font size — *not* * against `host`; * - `em` (`'3em'`), resolved against `options.host`'s computed font size, falling back to the * document root (i.e. behaving like `rem`) when the host is omitted or has no computed style; * - `%` (`'50%'`), resolved against `options.percentBase`; it is unavailable without that base; * - `vw`/`vh`, resolved against a supplied `Window` or `{ inlineSize, blockSize }` viewport basis, * otherwise against the host/ambient document's live viewport. * * Units are case-insensitive and surrounding whitespace is ignored. The root font size is read on * every call and never cached, so browser zoom, a user font-size preference, or an app changing its * base size are picked up on the next measurement with no invalidation mechanism. * * Everything else resolves to `undefined`, meaning "no usable length" — callers treat that the same * as an unset value. That includes font-metric (`ch`/`ex`) and absolute (`pt`/`cm`/…) units plus * `calc()`/`var()` expressions. * * Negative and zero lengths are resolved faithfully rather than rejected (`-2rem` at a 16px root is * `-32`); this reports what a value means in pixels and leaves range policy to the caller. `NaN`, * `Infinity`, `''`, `null` and `undefined` all resolve to `undefined`. * * @returns pixels, or `undefined` for an unparseable value. */ export declare function resolveCssLength(value:number|string|undefined,options?:ResolveCssLengthOptions):number|undefined;