dimensions() — tailwindcss Function Reference
Architecture documentation for the dimensions() function in dimensions.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 06ffc038_18ab_2fb1_266d_adc31a72e8a6["dimensions()"] 27d3cdf1_e27d_4437_413c_da251dc63276["dimensions.ts"] 06ffc038_18ab_2fb1_266d_adc31a72e8a6 -->|defined in| 27d3cdf1_e27d_4437_413c_da251dc63276 style 06ffc038_18ab_2fb1_266d_adc31a72e8a6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/utils/dimensions.ts lines 6–20
export const dimensions = new DefaultMap((input) => {
let match = DIMENSION_REGEX.exec(input)
if (!match) return null
let value = match.groups?.value
if (value === undefined) return null
let valueAsNumber = Number(value)
if (Number.isNaN(valueAsNumber)) return null
let unit = match.groups?.unit
if (unit === undefined) return [valueAsNumber, null] as const
return [valueAsNumber, unit] as const
})
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does dimensions() do?
dimensions() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/utils/dimensions.ts.
Where is dimensions() defined?
dimensions() is defined in packages/tailwindcss/src/utils/dimensions.ts at line 6.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free