clearNamespace() — tailwindcss Function Reference
Architecture documentation for the clearNamespace() function in theme.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD ca9197a7_55f9_0922_5cc4_25999295ca9b["clearNamespace()"] 0a0af711_c5b8_1a31_60fe_678ff9771f13["applyConfigToTheme()"] 0a0af711_c5b8_1a31_60fe_678ff9771f13 -->|calls| ca9197a7_55f9_0922_5cc4_25999295ca9b 24d95be4_356f_a1f9_9702_2a4f413db0f5["add()"] 24d95be4_356f_a1f9_9702_2a4f413db0f5 -->|calls| ca9197a7_55f9_0922_5cc4_25999295ca9b c8189e3c_da83_8664_ad35_d7e6af6bc483["getOptions()"] ca9197a7_55f9_0922_5cc4_25999295ca9b -->|calls| c8189e3c_da83_8664_ad35_d7e6af6bc483 3e179907_5f92_f314_14dc_f61853c74cad["get()"] ca9197a7_55f9_0922_5cc4_25999295ca9b -->|calls| 3e179907_5f92_f314_14dc_f61853c74cad style ca9197a7_55f9_0922_5cc4_25999295ca9b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/theme.ts lines 149–166
clearNamespace(namespace: string, clearOptions: ThemeOptions) {
let ignored = ignoredThemeKeyMap.get(namespace) ?? []
outer: for (let key of this.values.keys()) {
if (key.startsWith(namespace)) {
if (clearOptions !== ThemeOptions.NONE) {
let options = this.getOptions(key)
if ((options & clearOptions) !== clearOptions) {
continue
}
}
for (let ignoredNamespace of ignored) {
if (key.startsWith(ignoredNamespace)) continue outer
}
this.values.delete(key)
}
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does clearNamespace() do?
clearNamespace() is a function in the tailwindcss codebase.
What does clearNamespace() call?
clearNamespace() calls 2 function(s): get, getOptions.
What calls clearNamespace()?
clearNamespace() is called by 2 function(s): add, applyConfigToTheme.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free