v0.1.102
Pre-release
Pre-release
Breaking Changes?
- Spacing & sizing tokens now accept Double — all case size(Int) / case value(Int) across spacing, sizing, space, border, ring, outline, scroll, and opacity tokens changed to Double with automatic formatting (4.0 → "4", 1.5 → "1.5"). Callers using .size(4) still compile; pattern-matching code expecting Int will need updating.
New Features
- Directional margin & padding tokens — TWTMarginTop, TWTMarginRight, TWTMarginBottom, TWTMarginLeft, TWTPaddingLeft, TWTPaddingRight with modifier methods marginTop(), marginRight(), etc.
- Fractional spacing & sizing — .size(1.5) now produces m-1.5, w-2.5, etc.
- Arbitrary bracket support — .arbitrary("20px") on all spacing and sizing tokens produces m-[20px], w-[calc(100%-2rem)], etc.
- Color opacity parameter — all color token structs (TWTBackgroundColor, TWTTextColor, TWTBorderColor, etc.) accept opacity: Int? producing bg-blue-600/70 syntax.
- Bare border shorthand — TWTBorderWidth.bare produces "border" (no width suffix).
- TWColor additions — .white, .black, .transparent static properties.
- Arbitrary selector variant — TWVariant.arbitrary(String) for custom selectors like [data-active]: or .dark &:.
- Class string with variants — .class("custom-class", variants: [.hover, .dark]) overload on MarkupAttribute.
- Translate .px unit — TWTTranslate.px produces "translate-px".
Fixes
- Corrected logical sizing token case names and removed incorrect extra cases.
- Formatting and doc comment alignment across token files.
Full Changelog: 0.1.000...0.1.102