Guppy.App.Stylesheet (guppy v0.1.0)

Copy Markdown View Source

App-scoped stylesheet cache for reusable class references.

Stylesheet class names are strings and may contain base styles plus supported state variants. Resolution is Elixir-side and returns IR style keyword entries (:style, :hover_style, :focus_style, and friends) that can be merged into node options.

Summary

Functions

Resolves one or more app stylesheet class references to style option entries.

Types

class_def()

@type class_def() ::
  %{optional(state_key()) => list()} | keyword() | String.t() | list()

state_key()

@type state_key() ::
  :style
  | :hover_style
  | :focus_style
  | :focus_visible_style
  | :in_focus_style
  | :active_style
  | :disabled_style

t()

@type t() :: %Guppy.App.Stylesheet{
  classes: %{optional(String.t()) => %{optional(state_key()) => list()}},
  metadata: map()
}

Functions

resolve(stylesheet, class_refs)

Resolves one or more app stylesheet class references to style option entries.