layers() — tailwindcss Function Reference
Architecture documentation for the layers() function in stylesheet.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 541f0913_4821_09d0_f31d_05489c40ddc7["layers()"] c890fa7b_6e17_4e5d_74bf_b797d0f757b8["Stylesheet"] 541f0913_4821_09d0_f31d_05489c40ddc7 -->|defined in| c890fa7b_6e17_4e5d_74bf_b797d0f757b8 a0235ccd_65fd_a71a_fafb_d79570dbb04c["migrateAtLayerUtilities()"] a0235ccd_65fd_a71a_fafb_d79570dbb04c -->|calls| 541f0913_4821_09d0_f31d_05489c40ddc7 2c2d9239_b049_29e5_d26a_fdb5e6893cee["split()"] 2c2d9239_b049_29e5_d26a_fdb5e6893cee -->|calls| 541f0913_4821_09d0_f31d_05489c40ddc7 2bdbdfd3_d2ee_fa4c_25dd_5a768897ae90["util()"] 2bdbdfd3_d2ee_fa4c_25dd_5a768897ae90 -->|calls| 541f0913_4821_09d0_f31d_05489c40ddc7 e6db46b5_0cdf_2502_9206_17333e8fd473["walkDepth()"] 541f0913_4821_09d0_f31d_05489c40ddc7 -->|calls| e6db46b5_0cdf_2502_9206_17333e8fd473 style 541f0913_4821_09d0_f31d_05489c40ddc7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-upgrade/src/stylesheet.ts lines 136–152
layers() {
let layers = new Set<string>()
for (let { item, path } of walkDepth(this, (sheet) => sheet.parents)) {
if (item.parents.size > 0) {
continue
}
for (let { meta } of path) {
for (let layer of meta.layers) {
layers.add(layer)
}
}
}
return layers
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does layers() do?
layers() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/stylesheet.ts.
Where is layers() defined?
layers() is defined in packages/@tailwindcss-upgrade/src/stylesheet.ts at line 136.
What does layers() call?
layers() calls 1 function(s): walkDepth.
What calls layers()?
layers() is called by 3 function(s): migrateAtLayerUtilities, split, util.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free