Home / File/ ui.spec.ts — tailwindcss Source File

ui.spec.ts — tailwindcss Source File

Architecture documentation for ui.spec.ts, a typescript file in the tailwindcss codebase. 10 imports, 0 dependents.

File typescript Oxide Scanner 10 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  3dc429a0_5545_c843_5c3d_ae12e834e123["ui.spec.ts"]
  cc39a724_b44f_cf69_4007_aecaae32d127["optimize.ts"]
  3dc429a0_5545_c843_5c3d_ae12e834e123 --> cc39a724_b44f_cf69_4007_aecaae32d127
  b082614d_1264_c8b0_a1b1_d0c85419e965["optimize"]
  3dc429a0_5545_c843_5c3d_ae12e834e123 --> b082614d_1264_c8b0_a1b1_d0c85419e965
  23bd4e2f_c62c_a942_7014_8486569053ee["index.ts"]
  3dc429a0_5545_c843_5c3d_ae12e834e123 --> 23bd4e2f_c62c_a942_7014_8486569053ee
  c59be670_b950_e897_c2ef_f6a86119dcc3["compile"]
  3dc429a0_5545_c843_5c3d_ae12e834e123 --> c59be670_b950_e897_c2ef_f6a86119dcc3
  bb9924cc_8308_a1f9_0e30_76de45a64970["segment.ts"]
  3dc429a0_5545_c843_5c3d_ae12e834e123 --> bb9924cc_8308_a1f9_0e30_76de45a64970
  c58cbb33_f3cc_0b4f_844a_15bf66a1dc61["segment"]
  3dc429a0_5545_c843_5c3d_ae12e834e123 --> c58cbb33_f3cc_0b4f_844a_15bf66a1dc61
  a1a98976_4d8c_bd03_8b57_38b8ac9cb9ab["test"]
  3dc429a0_5545_c843_5c3d_ae12e834e123 --> a1a98976_4d8c_bd03_8b57_38b8ac9cb9ab
  5a22a82e_ea42_a956_7900_a189873ab04d["oxide"]
  3dc429a0_5545_c843_5c3d_ae12e834e123 --> 5a22a82e_ea42_a956_7900_a189873ab04d
  9c72d32d_a535_69d4_565b_b620ce2eaae1["node:fs"]
  3dc429a0_5545_c843_5c3d_ae12e834e123 --> 9c72d32d_a535_69d4_565b_b620ce2eaae1
  89aef3dd_1eed_c141_d425_b8949215a653["node:path"]
  3dc429a0_5545_c843_5c3d_ae12e834e123 --> 89aef3dd_1eed_c141_d425_b8949215a653
  style 3dc429a0_5545_c843_5c3d_ae12e834e123 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { expect, test, type Page } from '@playwright/test'
import { Scanner } from '@tailwindcss/oxide'
import fs from 'node:fs'
import path from 'node:path'
import { optimize } from '../../@tailwindcss-node/src/optimize'
import { compile } from '../src'
import { segment } from '../src/utils/segment'

const html = String.raw
const css = String.raw

test('touch action', async ({ page }) => {
  let { getPropertyValue } = await render(
    page,
    html`<div id="x" class="touch-pan-x touch-pan-y hover:touch-pinch-zoom">Hello world</div>`,
  )

  expect(await getPropertyValue('#x', 'touch-action')).toEqual('pan-x pan-y')

  await page.locator('#x').hover()

  expect([
    // `manipulation` is an alias for `pan-x pan-y pinch-zoom` and some engines
    // compute the combination of those three values to `manipulation` even when
    // explicitly set as three values.
    'manipulation',
    'pan-x pan-y pinch-zoom',
  ]).toContain(await getPropertyValue('#x', 'touch-action'))
})

for (let [classes, expected] of [
  [
    'bg-linear-to-r from-red',
    'linear-gradient(to right in oklab, rgb(255, 0, 0) 0%, rgba(0, 0, 0, 0) 100%)',
  ],
  [
    'bg-linear-to-r via-red',
    'linear-gradient(to right in oklab, rgba(0, 0, 0, 0) 0%, rgb(255, 0, 0) 50%, rgba(0, 0, 0, 0) 100%)',
  ],
  [
    'bg-linear-to-r to-red',
    'linear-gradient(to right in oklab, rgba(0, 0, 0, 0) 0%, rgb(255, 0, 0) 100%)',
  ],
  [
    'bg-linear-to-r from-red to-blue',
    'linear-gradient(to right in oklab, rgb(255, 0, 0) 0%, rgb(0, 0, 255) 100%)',
  ],
  [
    'bg-linear-45 from-red to-blue',
    'linear-gradient(45deg in oklab, rgb(255, 0, 0) 0%, rgb(0, 0, 255) 100%)',
  ],
  [
    '-bg-linear-45 from-red to-blue',
    // Chrome reports a different (but also correct) computed value than Firefox/WebKit so we check
    // for both options.
    [
      'linear-gradient(-45deg in oklab, rgb(255, 0, 0) 0%, rgb(0, 0, 255) 100%)',
      'linear-gradient(calc(-45deg) in oklab, rgb(255, 0, 0) 0%, rgb(0, 0, 255) 100%)',
    ],
  ],
// ... (2213 more lines)

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does ui.spec.ts do?
ui.spec.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 ui.spec.ts?
ui.spec.ts defines 2 function(s): getPropertyValue, render.
What does ui.spec.ts depend on?
ui.spec.ts imports 10 module(s): compile, index.ts, node:fs, node:path, optimize, optimize.ts, oxide, segment, and 2 more.
Where is ui.spec.ts in the architecture?
ui.spec.ts is located at packages/tailwindcss/tests/ui.spec.ts (domain: Oxide, subdomain: Scanner, directory: packages/tailwindcss/tests).

Analyze Your Own Codebase

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

Try Supermodel Free