Home / Function/ property() — tailwindcss Function Reference

property() — tailwindcss Function Reference

Architecture documentation for the property() function in utilities.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  b43ee24f_e9ee_4033_2f2b_968887b95935["property()"]
  a9af385a_fd12_f1d8_7cf0_ccb9b281ca18["atRule()"]
  b43ee24f_e9ee_4033_2f2b_968887b95935 -->|calls| a9af385a_fd12_f1d8_7cf0_ccb9b281ca18
  85b46de2_edfa_9371_e2c6_e60f3f5346a2["decl()"]
  b43ee24f_e9ee_4033_2f2b_968887b95935 -->|calls| 85b46de2_edfa_9371_e2c6_e60f3f5346a2
  style b43ee24f_e9ee_4033_2f2b_968887b95935 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/utilities.ts lines 156–168

function property(ident: string, initialValue?: string, syntax?: string) {
  return atRule('@property', ident, [
    decl('syntax', syntax ? `"${syntax}"` : `"*"`),
    decl('inherits', 'false'),

    // If there's no initial value, it's important that we omit it rather than
    // use an empty value. Safari currently doesn't support an empty
    // `initial-value` properly, so we have to design how we use things around
    // the guaranteed invalid value instead, which is how `initial-value`
    // behaves when omitted.
    ...(initialValue ? [decl('initial-value', initialValue)] : []),
  ])
}

Subdomains

Frequently Asked Questions

What does property() do?
property() is a function in the tailwindcss codebase.
What does property() call?
property() calls 2 function(s): atRule, decl.

Analyze Your Own Codebase

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

Try Supermodel Free