Skip to content

Function: rem() ​

ts
function rem(designWidth, options?): void;

Set font size of HTML tag according to the design width.

Parameters ​

ParameterTypeDescription
designWidthnumberThe design width of the page.
optionsRemOptionsThe optional parameters.

Returns ​

void

Example ​

ts
// Sets the HTML font size based on a design width of 750 pixels
// with a maximum width of 2000 pixels and a minimum width of 375 pixels.
rem(750, { maxWith: 2000, minWith: 375 })

Since ​

1.0.0

Released under the MIT License.