Skip to content

v0.3.000

Choose a tag to compare

@amirsaam amirsaam released this 31 Jul 17:55
· 23 commits to main since this release

Breaking change:

  • .gap(_:), .gapX(_:), .gapY(_:) now accept typed tokens (TWTGap, TWTGapX, TWTGapY) instead of raw Int, matching the rest of the API. Update call sites: .gap(4).gap(.size(4)), .gap(0).gap(.zero).

Adds:

Arbitrary value support (UsingACustomValue utilities)

.arbitrary(String) added to ~70 token types, letting every documented custom-value utility emit bracket-syntax classes without falling back to raw strings:

  • Filters/Effectsblur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, saturate, sepia + all 8 backdrop-* filters, shadow, opacity, mask, mask-position, mask-size, text-shadow
  • Transforms/Transitionsscale, rotate, translate, skew, transform, origin, perspective, perspective-origin, zoom, transition, duration, ease, delay
  • Layoutdisplay, aspect, columns, gap, gap-x, gap-y, grid-cols, grid-rows, auto-cols, auto-rows, col-span, row-span, object-position, z-index, order
  • Borders/Tablesrounded, border, outline, outline-offset, border-spacing
  • Typographyfont-family, font-weight, font-size, font-stretch, tracking, line-clamp, tab-size, vertical-align
  • Miscanimation, cursor, stroke-width

TWColor.arbitrary(_:)

New factory on TWColor so every color utility (background, text, border, outline, caret, accent, decoration, fill, stroke) emits arbitrary color classes: .backgroundColor(.arbitrary("#0f172a"))bg-[#0f172a].

div(.scale(.arbitrary("1.7"))) { ... }                       // scale-[1.7]
div(.gridTemplateColumns(.arbitrary("200px_minmax(900px,1fr)_100px"))) { ... }
div(.backgroundColor(.arbitrary("#0f172a"))) { ... }         // bg-[#0f172a]

Full Changelog: 0.2.204...0.3.000