Home / Function/ parseThemeOptions() — tailwindcss Function Reference

parseThemeOptions() — tailwindcss Function Reference

Architecture documentation for the parseThemeOptions() function in index.ts from the tailwindcss codebase.

Function typescript Oxide Extractor calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  4b536275_f895_5c7c_ef63_324a296c4922["parseThemeOptions()"]
  23bd4e2f_c62c_a942_7014_8486569053ee["index.ts"]
  4b536275_f895_5c7c_ef63_324a296c4922 -->|defined in| 23bd4e2f_c62c_a942_7014_8486569053ee
  f7f9b3da_5977_1aa6_3bcb_bfc607af4e8f["parseCss()"]
  f7f9b3da_5977_1aa6_3bcb_bfc607af4e8f -->|calls| 4b536275_f895_5c7c_ef63_324a296c4922
  c58cbb33_f3cc_0b4f_844a_15bf66a1dc61["segment()"]
  4b536275_f895_5c7c_ef63_324a296c4922 -->|calls| c58cbb33_f3cc_0b4f_844a_15bf66a1dc61
  style 4b536275_f895_5c7c_ef63_324a296c4922 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/index.ts lines 85–104

function parseThemeOptions(params: string) {
  let options = ThemeOptions.NONE
  let prefix = null

  for (let option of segment(params, ' ')) {
    if (option === 'reference') {
      options |= ThemeOptions.REFERENCE
    } else if (option === 'inline') {
      options |= ThemeOptions.INLINE
    } else if (option === 'default') {
      options |= ThemeOptions.DEFAULT
    } else if (option === 'static') {
      options |= ThemeOptions.STATIC
    } else if (option.startsWith('prefix(') && option.endsWith(')')) {
      prefix = option.slice(7, -1)
    }
  }

  return [options, prefix] as const
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does parseThemeOptions() do?
parseThemeOptions() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/index.ts.
Where is parseThemeOptions() defined?
parseThemeOptions() is defined in packages/tailwindcss/src/index.ts at line 85.
What does parseThemeOptions() call?
parseThemeOptions() calls 1 function(s): segment.
What calls parseThemeOptions()?
parseThemeOptions() is called by 1 function(s): parseCss.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free