tailwindlabs/tailwindcss
A utility-first CSS framework for rapid UI development.
TypeScript★ 98,543+122 that day#8 on trending
C57.3/100
Duplication59
6.5% in typescript, rust, javascript, tsxDead code89
1.3%Complexity39
69.5% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
6.3%duplicated code · 4,038 of 64,103 lines
232clones in code
236code files of 449 scanned
6.65%duplicated over all files · 646 clones
Most complex files
- packages/tailwindcss/src/utilities.ts1193 cx
- packages/tailwindcss/src/canonicalize-candidates.ts769 cx
- packages/tailwindcss/src/utilities.test.ts379 cx
- packages/tailwindcss/src/ast.ts365 cx
- packages/tailwindcss/src/compat/plugin-api.test.ts359 cx
- crates/ignore/src/walk.rs339 cx
- packages/tailwindcss/src/index.test.ts323 cx
- packages/tailwindcss/src/variants.ts307 cx
- packages/tailwindcss/src/candidate.ts237 cx
- integrations/utils.ts220 cx
Dead code 1.28% unused · 14 findings
- integrations/utils.tsunused-file
- packages/tailwindcss/src/source-maps/visualize-source-map.tsunused-file
- packages/@tailwindcss-upgrade/src/codemods/template/migrate-arbitrary-variants.tsunused-file
- packages/@tailwindcss-cli/src/utils/disposables.tsunused-file
- packages/tailwindcss/src/cartesian.tsunused-file
- packages/tailwindcss/src/test-utils/custom-serializer.tsunused-file
- packages/@tailwindcss-cli/src/utils/resolve.ts:resolveCssIdunused-export
- packages/@tailwindcss-upgrade/src/utils/package-version.ts:getPackageVersionunused-export
- packages/@tailwindcss-cli/src/utils/renderer.ts:formatDurationunused-export
- packages/@tailwindcss-upgrade/src/utils/renderer.ts:formatDurationunused-export
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 99 lines in 2 placesrust501 tokens
201fn test_candidate_extraction() { 202 for (input, expected) in [ 203 // Simple utility 204 ("flex", vec!["flex"]), 205 // Simple utility with special character(s) 206 ("@container", vec!["@container"]), 207 // Single character utility 208 ("a", vec!["a"]), 209 // Simple utility with dashes 210 ("items-center", vec!["items-center"]),First 10 of 99 lines.
- 97 lines in 2 placestypescript480 tokenspackages/@tailwindcss-turbopack/src/index.ts:194–290packages/@tailwindcss-webpack/src/index.ts:194–290
194 DEBUG && I.end(`[@tailwindcss/turbopack] ${path.relative(base, inputFile)}`) 195 callback(null, source) 196 return 197} 198 199// Setup or update scanner if needed 200if (context.scanner === null || rebuildStrategy === 'full') { 201 DEBUG && I.start('Setup scanner') 202 let sources = (() => { 203 // Disable auto source detectionFirst 10 of 97 lines.
- 101 lines in 2 placestypescript446 tokenspackages/@tailwindcss-upgrade/src/codemods/template/migrate-theme-to-var.ts:170–270packages/tailwindcss/src/canonicalize-candidates.ts:1078–1178
170} 171 172function substituteFunctionsInValue( 173 ast: ValueParser.ValueAstNode[], 174 handle: (value: string, fallback?: string) => string | null, 175) { 176 walk(ast, (node, ctx) => { 177 if (node.kind === 'function' && node.value === 'theme') { 178 if (node.nodes.length < 1) return 179First 10 of 101 lines.
7 more
- 89 lines in 2 placestypescript375 tokens
- 77 lines in 2 placestypescript370 tokens
- 70 lines in 2 placesrust367 tokens
- 63 lines in 2 placesrust331 tokens
- 8 lines in 4 placesrust106 tokens
- 86 lines in 2 placestypescript305 tokens
- 6 lines in 6 placesrust59 tokens
Largest clones over all files, tests and data included
- 36 lines in 10 placesmarkdowndocs and examples244 tokensREADME.md:1–36packages/@tailwindcss-browser/README.md:1–36packages/@tailwindcss-cli/README.md:1–36packages/@tailwindcss-node/README.md:1–36packages/@tailwindcss-postcss/README.md:1–36and 5 more
1<p align="center"> 2 <a href="https://tailwindcss.com" target="_blank"> 3 <picture> 4 <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-dark.svg"> 5 <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg"> 6 <img alt="Tailwind CSS" src="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg" width="350" height="70" style="max-w… 7 </picture> 8 </a> 9</p> 10First 10 of 36 lines.
- 157 lines in 2 placesyamldata files1,089 tokens
25 group: ${{ github.workflow }}-${{ github.ref }} 26 cancel-in-progress: true 27 28jobs: 29 build: 30 strategy: 31 matrix: 32 include: 33 # Windows 34 - os: windows-latestFirst 10 of 157 lines.
- 16 lines in 10 placestypescripttests116 tokenspackages/tailwindcss/src/walk.test.ts:8–23packages/tailwindcss/src/walk.test.ts:66–81packages/tailwindcss/src/walk.test.ts:91–106packages/tailwindcss/src/walk.test.ts:116–131packages/tailwindcss/src/walk.test.ts:141–156and 5 more
8test('visit all nodes in an AST', () => { 9 let ast: AstNode[] = [ 10 { 11 kind: 'a', 12 nodes: [ 13 { kind: 'b', nodes: [{ kind: 'c' }] }, 14 { kind: 'd', nodes: [{ kind: 'e', nodes: [{ kind: 'f' }] }] }, 15 { kind: 'g', nodes: [{ kind: 'h' }] }, 16 ], 17 },First 10 of 16 lines.
- 99 lines in 2 placesyamldata files701 tokens
- 11 lines in 11 placestypescripttests63 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 167 | 42,250 | 133 | 2,674 | 6.33% |
| rust | 57 | 20,975 | 96 | 1,317 | 6.28% |
| javascript | 9 | 821 | 2 | 29 | 3.53% |
| tsx | 3 | 57 | 1 | 18 | 31.58% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 292 | 139,127 | 473 | 8,934 | 6.42% |
| rust | 61 | 25,454 | 138 | 1,805 | 7.09% |
| markdown | 17 | 5,396 | 15 | 452 | 8.38% |
| yaml | 7 | 1,089 | 13 | 421 | 38.66% |
| json | 33 | 1,336 | 3 | 83 | 6.21% |
| javascript | 15 | 1,252 | 2 | 29 | 2.32% |
| diff | 3 | 212 | 1 | 8 | 3.77% |
| tsx | 3 | 57 | 1 | 18 | 31.58% |
| css | 2 | 908 | 0 | 0 | 0% |
| markup | 2 | 564 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 8, 2026 | #8 | 98,543 (+122) | 449 | 176,571 | 646 | 6.65% | 6.3% | C 57.3 | 9b2c925 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.