Home / Function/ layers() — tailwindcss Function Reference

layers() — tailwindcss Function Reference

Architecture documentation for the layers() function in stylesheet.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  34c49ae1_c1ff_8724_409c_7cb573bce07b["layers()"]
  f57a23db_2b42_5741_b08b_f818729aad91["migrateAtLayerUtilities()"]
  f57a23db_2b42_5741_b08b_f818729aad91 -->|calls| 34c49ae1_c1ff_8724_409c_7cb573bce07b
  3c87f6be_b589_4551_d24f_76f864dd1904["split()"]
  3c87f6be_b589_4551_d24f_76f864dd1904 -->|calls| 34c49ae1_c1ff_8724_409c_7cb573bce07b
  adaa4f93_d37d_764f_8bc2_6dd2bcb35675["util()"]
  adaa4f93_d37d_764f_8bc2_6dd2bcb35675 -->|calls| 34c49ae1_c1ff_8724_409c_7cb573bce07b
  31ee4631_a38a_927a_7804_2a89ae33533a["walkDepth()"]
  34c49ae1_c1ff_8724_409c_7cb573bce07b -->|calls| 31ee4631_a38a_927a_7804_2a89ae33533a
  style 34c49ae1_c1ff_8724_409c_7cb573bce07b 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

Frequently Asked Questions

What does layers() do?
layers() is a function in the tailwindcss codebase.
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