Skip to content

Releases: amirsaam/elementary-tailwind

0.3.700

Choose a tag to compare

@amirsaam amirsaam released this 05 Aug 21:16

Adds:

Divide utilities (borders)

  • divideX, divideYdivide-x, divide-y, divide-x-2, divide-x-reverse, plus .arbitrary
  • divideColordivide-gray-200, divide-red-600/50
  • divideStyledivide-solid, divide-dashed, divide-dotted, divide-double, divide-hidden, divide-none

Per-side border colors (borders)

  • .borderColor(.t, .gray.shade(200)) — directional colors via TWTBorderSide (all/x/y/t/r/b/l/s/e/bs/be): border-t-gray-200, border-x-blue, border-s-red-500/50
  • TWTBorderWidth now supports logical bs/be sides (border-bs-2, border-be-2)

Inset shadows (effects)

  • insetShadowinset-shadow-2xs/xs/sm/none plus .arbitrary

Combined size (sizing)

  • sizesize-4, size-full, size-1/2, size-px, viewport/logical variants, plus .arbitrary

Inset fractions (layout)

  • TWTInset.fraction("1/2") and .pxinset-1/2, left-px, etc. (no more .arbitrary("50%") workaround)

Overflow-wrap (typography)

  • overflowWrap — v4 wrap-normal, wrap-break-word, wrap-anywhere

Group / peer markers (variants)

  • .group(.bare) / .group(.named("item")) / .peer(.bare) / .peer(.named("email")) — emit group, group/item, peer, peer/email marker classes for group-*/peer-* variants

Fix:

  • Gradient direction tokens now emit Tailwind v4 bg-linear-to-* classes instead of the removed v3 bg-gradient-to-* (bg-linear-to-r, bg-linear-to-br, plus .arbitrary e.g. bg-linear-[65deg])

Docs:

  • README — gradient, borders, effects, sizing, layout, typography, and variants sections updated
  • AGENTS.md — marker token architecture + 0.3.xxx compatibility row

Full Changelog: 0.3.000...0.3.700

v0.3.000

Choose a tag to compare

@amirsaam amirsaam released this 31 Jul 17:55

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

v0.2.204

Choose a tag to compare

@amirsaam amirsaam released this 30 Jul 15:24

Adds:

Output value exctraction helper

  • twValue() — global variadic function that extracts Tailwind class strings from modifier calls outside an HTML builder context. Accepts .translate(), .margin(), .text(), etc. and returns a space-joined String.
  • HTMLTag._twPhantom — phantom tag used to pin the generic MarkupAttribute<Tag> parameter, enabling the concrete return type of twValue().
  • .fillCurrent(), .fillInherit(), .fillTransparent() — dedicated modifier methods for SVG fill keyword values (fill-current, fill-inherit, fill-transparent)

Fix:

  • Update TWTTransform.none token value from old v3 to new v4 transform-none

Full Changelog: 0.2.100...0.2.204

v0.2.100

Choose a tag to compare

@amirsaam amirsaam released this 29 Jul 23:26

Negative token support across 34 modifier functions

  • Spacing: margin, marginX, marginY, marginTop, marginRight, marginBottom, marginLeft
  • Layout: inset, insetX, insetY, insetTop, insetRight, insetBottom, insetLeft, zIndex, order
  • Transforms: scale, rotate, translate, skew
  • Interactivity: scrollMargin, scrollMarginX, scrollMarginY, scrollMarginTop, scrollMarginRight, scrollMarginBottom, scrollMarginLeft, scrollPadding, scrollPaddingX, scrollPaddingY, scrollPaddingTop, scrollPaddingRight, scrollPaddingBottom, scrollPaddingLeft

Added negative: Bool = false parameter to affected functions; passing true prepends - to generate negative CSS classes (e.g., .margin(.size(4), negative: true)-m-4)

Full Changelog: 0.2.000...0.2.100

v0.2.000

Choose a tag to compare

@amirsaam amirsaam released this 29 Jul 12:50

Tailwind CSS v4 Compliance & Comprehensive Test Coverage

This release brings the entire token library into full alignment with Tailwind CSS v4.3.3, adds 34 new Layout modifier functions, and increases snapshot test coverage from 145 → 169 tests.

Breaking changes

  • brightness()/grayscale()/invert()/saturate()/sepia()/backdrop* numeric methods.percent(Int) removed; now take Int directly (produces brightness-50, not brightness-50%)
  • borderCollapse() — removed .revert (v3-only)
  • boxShadow() — removed .inner (v3-only shadow-inner)
  • textShadow() — removed .xl, .xxl, .inner; prefix changed shadow-*text-shadow-*
  • wordBreak() — removed .words (break-words) and .anywhere (break-anywhere) (v3-only)

v4 renames & additions

Utility v3 v4
BoxShadow shadow-sm shadow-xs
BoxShadow shadow shadow-sm
BoxShadow added .xxs = "shadow-2xs"
TextShadow added .xxs = "text-shadow-2xs"
TextOverflow overflow-ellipsis added .ellipsis = "text-ellipsis"
Whitespace whitespace-normal fixed rawValue from "normal"
TransitionBehavior transition-allow-discrete transition-discrete
TransitionTiming added .initial = "ease-initial"
ScrollSnapType added .mandatory, .proximity
ScrollSnapAlign snap-none snap-align-none
Blur .md = "blur" (bare) "blur-md"; added .xxxl = "blur-3xl"
BackdropBlur .md = "backdrop-blur" (bare) "backdrop-blur-md"; added .xxxl = "backdrop-blur-3xl"
DropShadow .md = "drop-shadow" (bare) "drop-shadow-md"
BorderRadius .md = "rounded" (bare) "rounded-md"; added .fourxl = "rounded-4xl"
TextWrap "wrap" "text-wrap"
VerticalAlign "baseline" "align-baseline"

New modifier functions

  • Layout: flexWrap, flexGrow, flexShrink, alignContent, alignSelf, gapY, insetTop, insetRight, insetBottom, insetLeft, insetX, insetY, aspect, columns, order, float, clear, overflowX, overflowY, overscrollBehavior/X/Y, objectFit, objectPosition, isolation, boxSizing, breakAfter/Before/Inside, boxDecorationBreak, gridTemplateColumns/Rows, gridColumn/Start/End, gridRow/Start/End, gridAutoFlow/Columns/Rows, flexBasis, justifyItems, justifySelf, placeContent/Items/Self

Bug fixes

  • inset directional functions — renamed from top()/right()/bottom()/left() to insetTop()/insetRight()/insetBottom()/insetLeft() (avoided ambiguity with Spacing)
  • inset double-prefix — fixed inset-inset-* bug in directional variants
  • TWTInset — added .arbitrary(String) for bracket syntax
  • TWTLineHeight — added .value(Double) and .arbitrary(String) cases
  • Color opacity — all color modifier functions now forward the opacity: parameter correctly
  • Various tokens — added missing .container, .fraction, .arbitrary cases

Testing

  • 169 snapshot tests (up from 145) across 17 suites
  • Every Layout modifier function covered with at least one test + variant test
  • Value patterns (.size(N), .number(N), .value(N), .arbitrary("…"), .fraction) tested per function

Full Changelog: 0.1.102...0.2.000

v0.1.102

v0.1.102 Pre-release
Pre-release

Choose a tag to compare

@amirsaam amirsaam released this 27 Jul 13:06

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

v0.1.000

v0.1.000 Pre-release
Pre-release

Choose a tag to compare

@amirsaam amirsaam released this 26 Jul 12:39

First public release.

Type-safe wrappers for all 16 Tailwind CSS v4 utility categories (190+ token types), variant system (hover, focus, responsive, dark mode, container queries), and setupTailwind() CDN helper. 144 snapshot tests.

Full Changelog: https://github.com/amirsaam/elementary-tailwind/commits/0.1.000