intellisense.bench.ts — tailwindcss Source File
Architecture documentation for intellisense.bench.ts, a typescript file in the tailwindcss codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 8cb4c4a2_034a_b602_e465_a3900bfecd6a["intellisense.bench.ts"] bdedd2f6_da4b_69dc_e990_0814b59fbe6e["design-system.ts"] 8cb4c4a2_034a_b602_e465_a3900bfecd6a --> bdedd2f6_da4b_69dc_e990_0814b59fbe6e e557c8a4_bb27_ee44_c462_9e238157ad04["buildDesignSystem"] 8cb4c4a2_034a_b602_e465_a3900bfecd6a --> e557c8a4_bb27_ee44_c462_9e238157ad04 e28cd4a7_4e1a_e79b_76f1_86c479c6640d["theme.ts"] 8cb4c4a2_034a_b602_e465_a3900bfecd6a --> e28cd4a7_4e1a_e79b_76f1_86c479c6640d e7a2e966_188e_28f5_d9d6_e54e27e0d0f2["Theme"] 8cb4c4a2_034a_b602_e465_a3900bfecd6a --> e7a2e966_188e_28f5_d9d6_e54e27e0d0f2 f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3["vitest"] 8cb4c4a2_034a_b602_e465_a3900bfecd6a --> f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3 style 8cb4c4a2_034a_b602_e465_a3900bfecd6a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { bench } from 'vitest'
import { buildDesignSystem } from './design-system'
import { Theme } from './theme'
function loadDesignSystem() {
let theme = new Theme()
theme.add('--spacing-0_5', '0.125rem')
theme.add('--spacing-1', '0.25rem')
theme.add('--spacing-3', '0.75rem')
theme.add('--spacing-4', '1rem')
theme.add('--width-4', '1rem')
theme.add('--colors-red-500', 'red')
theme.add('--colors-blue-500', 'blue')
theme.add('--breakpoint-sm', '640px')
theme.add('--font-size-xs', '0.75rem')
theme.add('--font-size-xs--line-height', '1rem')
theme.add('--perspective-dramatic', '100px')
theme.add('--perspective-normal', '500px')
theme.add('--opacity-background', '0.3')
return buildDesignSystem(theme)
}
let design = loadDesignSystem()
bench('getClassList', () => {
design.getClassList()
})
bench('getVariants', () => {
design.getVariants()
})
bench('getVariants -> selectors(…)', () => {
let variants = design.getVariants()
let group = variants.find((v) => v.name === 'group')!
// A selector-based variant
group.selectors({ value: 'hover' })
// A selector-based variant with a modifier
group.selectors({ value: 'hover', modifier: 'sidebar' })
// A nested, compound, selector-based variant
group.selectors({ value: 'group-hover' })
// This variant produced an at rule
group.selectors({ value: 'sm' })
// This variant does not exist
group.selectors({ value: 'md' })
})
bench('candidatesToCss', () => {
design.candidatesToCss(['underline', 'i-dont-exist', 'bg-[#fff]', 'bg-[#000]'])
})
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does intellisense.bench.ts do?
intellisense.bench.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the Oxide domain, Scanner subdomain.
What functions are defined in intellisense.bench.ts?
intellisense.bench.ts defines 1 function(s): loadDesignSystem.
What does intellisense.bench.ts depend on?
intellisense.bench.ts imports 5 module(s): Theme, buildDesignSystem, design-system.ts, theme.ts, vitest.
Where is intellisense.bench.ts in the architecture?
intellisense.bench.ts is located at packages/tailwindcss/src/intellisense.bench.ts (domain: Oxide, subdomain: Scanner, directory: packages/tailwindcss/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free