Skip to content

five-on-it / apps/client/src/gui/theme / themeFor

Function: themeFor() ​

themeFor(width, height, coarse?): Theme

Defined in: apps/client/src/gui/theme.ts:91

The theme for a canvas of width × height CSS pixels: the type grows from 11 to 13 px with the width (clamp(11px, 0.55rem + 0.3vw, 13px)), 11 px on a short window; controls are 30 px, 26 on a short window, 44 under a coarse pointer; the minimap is min(200px, 24vw, 24vh).

Parameters ​

width ​

number

height ​

number

coarse? ​

boolean = false

Returns ​

Theme