prefix.test.ts — tailwindcss Source File
Architecture documentation for prefix.test.ts, a typescript file in the tailwindcss codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6d7bfa8c_923d_a329_ea29_de65ad28879c["prefix.test.ts"] 914a5326_dcdd_e839_bbc4_d6545cf4c5d5["plugin.ts"] 6d7bfa8c_923d_a329_ea29_de65ad28879c --> 914a5326_dcdd_e839_bbc4_d6545cf4c5d5 f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3["vitest"] 6d7bfa8c_923d_a329_ea29_de65ad28879c --> f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3 4a833a47_de88_b79a_24ac_de077593f60a["."] 6d7bfa8c_923d_a329_ea29_de65ad28879c --> 4a833a47_de88_b79a_24ac_de077593f60a style 6d7bfa8c_923d_a329_ea29_de65ad28879c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { expect, test } from 'vitest'
import { compile } from '.'
import plugin from './plugin'
const css = String.raw
test('utilities must be prefixed', async () => {
let input = css`
@theme reference prefix(tw);
@tailwind utilities;
@utility custom {
color: red;
}
`
let compiler = await compile(input)
// Prefixed utilities are generated
expect(
compiler.build([
'tw:underline',
'tw:hover:line-through',
'tw:custom',
'tw:group-hover:flex',
'tw:peer-hover:flex',
]),
).toMatchInlineSnapshot(`
".tw\\:custom {
color: red;
}
.tw\\:underline {
text-decoration-line: underline;
}
.tw\\:group-hover\\:flex {
&:is(:where(.tw\\:group):hover *) {
@media (hover: hover) {
display: flex;
}
}
}
.tw\\:peer-hover\\:flex {
&:is(:where(.tw\\:peer):hover ~ *) {
@media (hover: hover) {
display: flex;
}
}
}
.tw\\:hover\\:line-through {
&:hover {
@media (hover: hover) {
text-decoration-line: line-through;
}
}
}
"
`)
// Non-prefixed utilities are ignored
compiler = await compile(input)
// ... (301 more lines)
Domain
Dependencies
- .
- plugin.ts
- vitest
Source
Frequently Asked Questions
What does prefix.test.ts do?
prefix.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the Oxide domain.
What does prefix.test.ts depend on?
prefix.test.ts imports 3 module(s): ., plugin.ts, vitest.
Where is prefix.test.ts in the architecture?
prefix.test.ts is located at packages/tailwindcss/src/prefix.test.ts (domain: Oxide, directory: packages/tailwindcss/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free