LiveStyle.Manifest.VarEntry (LiveStyle v0.12.0)

View Source

Entry structure for CSS custom properties (variables).

Summary

Functions

Gets the ident from a var entry.

Creates a new var entry.

Gets the type info from a var entry.

Gets the value from a var entry.

Types

t()

@type t() :: [ident: String.t(), value: String.t() | list(), type: keyword() | nil]

Functions

ident(entry)

@spec ident(t()) :: String.t()

Gets the ident from a var entry.

new(ident, value, type \\ nil)

@spec new(String.t(), String.t() | list(), keyword() | nil) :: t()

Creates a new var entry.

Parameters

  • ident - The CSS variable identifier (e.g., "--x1abc123")
  • value - The variable value (string or list for conditional values)
  • type - Optional typed property info (syntax, initial, inherits)

Examples

VarEntry.new("--x1abc123", "blue")
VarEntry.new("--x1abc123", "16px", [syntax: "<length>", initial: "0px", inherits: true])

type(entry)

@spec type(t()) :: keyword() | nil

Gets the type info from a var entry.

value(entry)

@spec value(t()) :: String.t() | list()

Gets the value from a var entry.