Home / Function/ isPercentage() — tailwindcss Function Reference

isPercentage() — tailwindcss Function Reference

Architecture documentation for the isPercentage() function in infer-data-type.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  62476965_f9ea_4906_7208_dd8bf9da2e20["isPercentage()"]
  516809a4_c70e_60c3_bbb2_8de4c4572510["infer-data-type.ts"]
  62476965_f9ea_4906_7208_dd8bf9da2e20 -->|defined in| 516809a4_c70e_60c3_bbb2_8de4c4572510
  5a421a84_1aa9_e155_4a8f_bd92935b6eec["isBackgroundPosition()"]
  5a421a84_1aa9_e155_4a8f_bd92935b6eec -->|calls| 62476965_f9ea_4906_7208_dd8bf9da2e20
  4220e834_b0a4_ab4d_5c39_b7b51b69e8cf["isBackgroundSize()"]
  4220e834_b0a4_ab4d_5c39_b7b51b69e8cf -->|calls| 62476965_f9ea_4906_7208_dd8bf9da2e20
  f04c0be0_0d43_f281_8a03_6eeea7eb5f25["hasMathFn()"]
  62476965_f9ea_4906_7208_dd8bf9da2e20 -->|calls| f04c0be0_0d43_f281_8a03_6eeea7eb5f25
  style 62476965_f9ea_4906_7208_dd8bf9da2e20 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/utils/infer-data-type.ts lines 181–183

function isPercentage(value: string): boolean {
  return IS_PERCENTAGE.test(value) || hasMathFn(value)
}

Subdomains

Calls

Frequently Asked Questions

What does isPercentage() do?
isPercentage() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/utils/infer-data-type.ts.
Where is isPercentage() defined?
isPercentage() is defined in packages/tailwindcss/src/utils/infer-data-type.ts at line 181.
What does isPercentage() call?
isPercentage() calls 1 function(s): hasMathFn.
What calls isPercentage()?
isPercentage() is called by 2 function(s): isBackgroundPosition, isBackgroundSize.

Analyze Your Own Codebase

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

Try Supermodel Free