1681-engine / react / windowStyle
Function: windowStyle() ​
ts
function windowStyle(
wanted,
viewport,
options?
): object;Defined in: src/react/placement.ts:15
Where a window or dialog of wanted size stands: fitted into the viewport by fitToViewport (shrunk to its minScale, then cut, then moved inside the edges), centred unless wanted has an x/y. The style places it in whole pixels with left/top, never translate(-50%), and caps its size so its body scrolls.
Parameters ​
| Parameter | Type |
|---|---|
wanted | | Size | Rect |
viewport | Size |
options | FitOptions |
Returns ​
object
fit ​
ts
fit: FitResult;style ​
ts
style: CSSProperties;