Home / File/ intellisense.bench.ts — tailwindcss Source File

intellisense.bench.ts — tailwindcss Source File

Architecture documentation for intellisense.bench.ts, a typescript file in the tailwindcss codebase. 5 imports, 0 dependents.

File typescript OxideEngine PreProcessors 5 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  14271861_6b03_2978_86b0_a7e8dcd458a0["intellisense.bench.ts"]
  7fd72d4c_e95c_d849_1002_1e1c9d8aca1a["design-system.ts"]
  14271861_6b03_2978_86b0_a7e8dcd458a0 --> 7fd72d4c_e95c_d849_1002_1e1c9d8aca1a
  9b965fd7_d8e9_0b43_cd5d_c9294ab598ed["buildDesignSystem"]
  14271861_6b03_2978_86b0_a7e8dcd458a0 --> 9b965fd7_d8e9_0b43_cd5d_c9294ab598ed
  80295787_127f_69e6_91b3_4bea3a484544["theme.ts"]
  14271861_6b03_2978_86b0_a7e8dcd458a0 --> 80295787_127f_69e6_91b3_4bea3a484544
  734cf7ec_fb2a_2532_7b20_b3a815c7e3e6["Theme"]
  14271861_6b03_2978_86b0_a7e8dcd458a0 --> 734cf7ec_fb2a_2532_7b20_b3a815c7e3e6
  696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"]
  14271861_6b03_2978_86b0_a7e8dcd458a0 --> 696bd648_5f24_1b59_8e8b_7a97a692869e
  style 14271861_6b03_2978_86b0_a7e8dcd458a0 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

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 OxideEngine domain, PreProcessors 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: OxideEngine, subdomain: PreProcessors, directory: packages/tailwindcss/src).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free