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
  2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69["decodeArbitraryValue()"]
  e90d9c51_31f0_3175_a861_610a15e277e5["decode-arbitrary-value.ts"]
  2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69 -->|defined in| e90d9c51_31f0_3175_a861_610a15e277e5
  d4b90da0_01b5_b21d_ff05_b37798744576["parseCandidate()"]
  d4b90da0_01b5_b21d_ff05_b37798744576 -->|calls| 2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69
  0cad61e7_3577_6e5c_a58f_e653598f37ea["parseModifier()"]
  0cad61e7_3577_6e5c_a58f_e653598f37ea -->|calls| 2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69
  7ba77268_84c7_7083_8f22_251a4a791d25["parseVariant()"]
  7ba77268_84c7_7083_8f22_251a4a791d25 -->|calls| 2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69
  ba41d638_0148_998b_cafb_fbd5a10ecee9["convertUnderscoresToWhitespace()"]
  2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69 -->|calls| ba41d638_0148_998b_cafb_fbd5a10ecee9
  2d6c8361_96d8_df0d_ca51_c62f179fdc73["parse()"]
  2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69 -->|calls| 2d6c8361_96d8_df0d_ca51_c62f179fdc73
  a409a820_0c6d_1955_f58f_c67b20671bd8["recursivelyDecodeArbitraryValues()"]
  2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69 -->|calls| a409a820_0c6d_1955_f58f_c67b20671bd8
  e79308d2_473f_b6d6_3b04_e4e55c2708d3["toCss()"]
  2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69 -->|calls| e79308d2_473f_b6d6_3b04_e4e55c2708d3
  0fb4e44c_8cd3_11bf_b382_1f29f9ed00b0["addWhitespaceAroundMathOperators()"]
  2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69 -->|calls| 0fb4e44c_8cd3_11bf_b382_1f29f9ed00b0
  style 2e1adb5d_9a16_16d9_9e0d_e7ef80a3ec69 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
}

Domain

Subdomains

Frequently Asked Questions

What does decodeArbitraryValue() do?
decodeArbitraryValue() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/utils/decode-arbitrary-value.ts.
Where is decodeArbitraryValue() defined?
decodeArbitraryValue() is defined in packages/tailwindcss/src/utils/decode-arbitrary-value.ts at line 4.
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