Home / Function/ decodeArbitraryValue() — tailwindcss Function Reference

decodeArbitraryValue() — tailwindcss Function Reference

Architecture documentation for the decodeArbitraryValue() function in decode-arbitrary-value.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  20489d8d_4ac1_6581_7ef8_8b43d79a6212["decodeArbitraryValue()"]
  53cf41fe_5903_d247_3bb3_38414ba7d631["parseCandidate()"]
  53cf41fe_5903_d247_3bb3_38414ba7d631 -->|calls| 20489d8d_4ac1_6581_7ef8_8b43d79a6212
  db928a82_c6a9_f0a7_efee_5436571565b0["parseModifier()"]
  db928a82_c6a9_f0a7_efee_5436571565b0 -->|calls| 20489d8d_4ac1_6581_7ef8_8b43d79a6212
  ca76ae68_c9c0_d977_a6d8_8ba86685bf25["parseVariant()"]
  ca76ae68_c9c0_d977_a6d8_8ba86685bf25 -->|calls| 20489d8d_4ac1_6581_7ef8_8b43d79a6212
  8a2e42cf_cbb8_4913_c2ad_33a2cbd2b313["convertUnderscoresToWhitespace()"]
  20489d8d_4ac1_6581_7ef8_8b43d79a6212 -->|calls| 8a2e42cf_cbb8_4913_c2ad_33a2cbd2b313
  0638028e_f2f7_8e77_2f19_1bd2ce4b2d6a["parse()"]
  20489d8d_4ac1_6581_7ef8_8b43d79a6212 -->|calls| 0638028e_f2f7_8e77_2f19_1bd2ce4b2d6a
  6835415c_08d3_78de_ebc3_29e921bf7043["recursivelyDecodeArbitraryValues()"]
  20489d8d_4ac1_6581_7ef8_8b43d79a6212 -->|calls| 6835415c_08d3_78de_ebc3_29e921bf7043
  f66dddcc_be1c_d082_4eb0_ec82ce3bf380["toCss()"]
  20489d8d_4ac1_6581_7ef8_8b43d79a6212 -->|calls| f66dddcc_be1c_d082_4eb0_ec82ce3bf380
  8eed8208_0e00_0a2f_7e14_6a6a81ad1a19["addWhitespaceAroundMathOperators()"]
  20489d8d_4ac1_6581_7ef8_8b43d79a6212 -->|calls| 8eed8208_0e00_0a2f_7e14_6a6a81ad1a19
  style 20489d8d_4ac1_6581_7ef8_8b43d79a6212 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/utils/decode-arbitrary-value.ts lines 4–17

export function decodeArbitraryValue(input: string): string {
  // There are definitely no functions in the input, so bail early
  if (input.indexOf('(') === -1) {
    return convertUnderscoresToWhitespace(input)
  }

  let ast = ValueParser.parse(input)
  recursivelyDecodeArbitraryValues(ast)
  input = ValueParser.toCss(ast)

  input = addWhitespaceAroundMathOperators(input)

  return input
}

Subdomains

Frequently Asked Questions

What does decodeArbitraryValue() do?
decodeArbitraryValue() is a function in the tailwindcss codebase.
What does decodeArbitraryValue() call?
decodeArbitraryValue() calls 5 function(s): addWhitespaceAroundMathOperators, convertUnderscoresToWhitespace, parse, recursivelyDecodeArbitraryValues, toCss.
What calls decodeArbitraryValue()?
decodeArbitraryValue() is called by 3 function(s): parseCandidate, parseModifier, parseVariant.

Analyze Your Own Codebase

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

Try Supermodel Free