GPUI.Tailwind (gpui v0.2.0)

Copy Markdown View Source

Small Tailwind-compatible class normalizer for GPUI element styles.

This intentionally starts with a constrained subset that maps cleanly to GPUI. Unknown classes are preserved under :class by callers and handled according to the :unknown_classes application setting: :warn (the development default), :error, or :keep.

Summary

Functions

Applies the configured warning or error policy to unsupported classes.

Types

result()

@type result() :: %{style: keyword(), unknown: [String.t()]}

Functions

handle_unknown!(classes)

@spec handle_unknown!([String.t()]) :: :ok

Applies the configured warning or error policy to unsupported classes.

normalize(classes)

@spec normalize(String.t() | [String.t()] | nil) :: result()