Variable: CSS_DIMENSION
ts
const CSS_DIMENSION: Regex<"(?<value>\\d+(?:\\.\\d+)?)(?<unit>[a-zA-Z_\\u0080-\\uFFFF][\\w\\-\\u0080-\\uFFFF]*)", {
names: {
unit: string;
value: string;
};
}>;Defined in: packages/regex/src/tiers/css-spec.ts:86
CSS dimension from W3C formal grammar. Number immediately followed by identifier (unit).
Example
ts
const match = CSS_DIMENSION.exec("16px");
match?.groups?.value // "16"
match?.groups?.unit // "px"