cssHasProperties() — ui Function Reference
Architecture documentation for the cssHasProperties() function in helpers.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD e064366d_d787_111b_590e_d9ec019cc193["cssHasProperties()"] d74412ab_0ee4_22df_d4c9_26e6c03c4a41["helpers.ts"] e064366d_d787_111b_590e_d9ec019cc193 -->|defined in| d74412ab_0ee4_22df_d4c9_26e6c03c4a41 style e064366d_d787_111b_590e_d9ec019cc193 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tests/src/utils/helpers.ts lines 89–106
export function cssHasProperties(
cssContent: string,
checks: Array<{
selector: string
properties: Record<string, string>
}>
) {
return checks.every(({ selector, properties }) => {
const escapedSelector = selector.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
const regex = new RegExp(`${escapedSelector}\\s*{([^}]+)}`, "s")
const match = cssContent.match(regex)
const block = match ? match[1] : ""
return Object.entries(properties).every(([property, value]) =>
block.includes(`${property}: ${value};`)
)
})
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does cssHasProperties() do?
cssHasProperties() is a function in the ui codebase, defined in packages/tests/src/utils/helpers.ts.
Where is cssHasProperties() defined?
cssHasProperties() is defined in packages/tests/src/utils/helpers.ts at line 89.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free