Web platform features explorer

Numeric factory functions

Limited availability
Tags: api Groups: CSS > CSS object models

The numeric factory functions, such as CSS.px() or CSS.kHz(), return a CSSUnitValue representing a CSS number value (as in 12px or 440kHz).

Browser support

  • Chrome 66 Released on 2018-04-17
  • Chrome Android 66 Released on 2018-04-17
  • Edge 79 Released on 2020-01-15
  • Firefox See bugzil.la/1278697
  • Firefox for Android See bugzil.la/1278697
  • Safari 16.4 Released on 2023-03-27
  • Safari on iOS 16.4 Released on 2023-03-27

Baseline availability blocked since March 2023 by Firefox (28 months)