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
  33ad9fa3_6ced_a665_219a_5d4b9e6b40ec["property()"]
  ffde8eb7_7def_91ee_918c_be4f250f76a2["utilities.ts"]
  33ad9fa3_6ced_a665_219a_5d4b9e6b40ec -->|defined in| ffde8eb7_7def_91ee_918c_be4f250f76a2
  2f6881be_62d9_4b96_7331_a962ced095f7["atRule()"]
  33ad9fa3_6ced_a665_219a_5d4b9e6b40ec -->|calls| 2f6881be_62d9_4b96_7331_a962ced095f7
  1369a6dc_e395_347d_5d24_b88e22c5446d["decl()"]
  33ad9fa3_6ced_a665_219a_5d4b9e6b40ec -->|calls| 1369a6dc_e395_347d_5d24_b88e22c5446d
  style 33ad9fa3_6ced_a665_219a_5d4b9e6b40ec 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)] : []),
  ])
}

Domain

Subdomains

Frequently Asked Questions

What does property() do?
property() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/utilities.ts.
Where is property() defined?
property() is defined in packages/tailwindcss/src/utilities.ts at line 156.
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