DioxusLabs/taffy
 Watch   
 Star   
 Fork   
16 days ago
taffy

v0.12.2

Fixed

  • Block: return margin-collapsing outputs from vertical axis ComputeSize calls (#976)
28 days ago
taffy

v0.12.1

This release container a couple of critical fixes for layout/caching bugs in the 0.12.0 release.

Fixed

  • Block: don't commit deferred in-flow layouts to the tree when only computing size (#971)
  • Block: pass through the requested run_mode when performing final layout on in-flow children, instead of always using MeasureSize (#972)
28 days ago
taffy

v0.12.0

The MSRV for this release is 1.71.

Block: support for align-content (#959)

Block containers now implement align_content along the block axis for their in-flow children.

More correct caching logic

  • The cache key now includes the axis, parent size, and available space, and ignores available space in an axis when a known dimension is set there. This is a performance hit (~10% in common cases, ~60% in pathalogically ones) but is necessary for correctness. It does also enable early-return optimizations (in cases where only the horizontal size is needed, which can allow that performance to be recouped in some cases (#911)

Fixed

  • Flexbox: fall back to safe align-self of start on absolute-position overflow (#958)
  • Block: derive definite height from aspect-ratio at final layout. A block container with aspect-ratio and an automatic height now becomes definite when its width is filled/stretched, so children's percentage heights resolve correctly and the ratio is preserved (#965)
2026-06-12 19:44:46
taffy

v0.11.0

The MSRV for this release is 1.71.

Implemented safe alignment keywords (#952)

Taffy now implements safe alignment (in addition to unsafe alignment).

The alignment style types are now structs consisting of an AlignmentKeyword and an AlignmentSafety modifier. For most users this will mean changing from using enum variants like AlignContent::Start to associated constants like AlignContent::START.

This change applies to the AlignContent, JustifyContent, AlignItems, JustifyItems, AlignSelf, and JustifySelf types.

Fixed

  • Grid: resolve item percentages against grid area rather than grid container (#960)
2026-04-14 18:37:07
taffy

v0.10.1

Fixed

  • CSS Grid auto-repeat and minimum-size handling (#946)
2026-04-01 00:32:59
taffy

v0.10.0

The MSRV for this release is 1.71.

Support for direction

The direction property is now supported, allowing for RTL layout of boxes in Block, Flexbox, and CSS Grid layout modes.

Support for floats

The float and clear properties are now supported. Support consists of a general-purpose FloatContext in the compute module, and integration of float layout into Block layout. Block layout now also has a BlockContext that allows a FloatContext to be shared across an entire Block formatting context.

Float support is feature flagged by the float_layout feature.

Support for parsing styles from CSS string (#929)

All of Taffy's style types (except the top-level Style struct) now have FromStr implementations that parses the type from the CSS representation of that value (e.g. 30px or 50% for LengthPercentage. A future version of Taffy will likely add support for parsing Style from ;-seperated CSS.

CSS parsing is feature flagged by the parse feature.

Changed

  • Make DetailedGridTracksInfo struct accessible from a public module (#899)
  • Add TaffyTree::write_tree method to debug print the tree into an arbitrary writer (#925)
  • The cache set and set APIs now take &LayoutInput rather than individual values (#933)

Fixed

  • Flexbox: apply gap even when there are auto margins (#938)
2025-11-23 02:28:23
taffy

v0.9.2

Fixed

  • Fix wrong size propogation for absolute elements (#878)
  • Fix bounds check in CellOccupancyMatrix::last_of_type (#890)
  • Use doc_cfg instead of doc_auto_cfg (#868)

Changed

  • Upgraded grid dependency from 0.18 to 1.0 (#864)
2025-09-27 22:24:35
taffy

v0.9.1

Fixed

  • Flexbox: don't apply cross-axis stretch alignment to children with auto margins (#861)
2025-08-07 22:05:13
taffy

v0.9.0

Support for named grid lines and grid areas

Taffy now supports named grid lines and areas.

As these rely on arbitrary user-provided strings, Taffy's Style struct is now generic over a string-like type (via the CheapCloneStr trait). Additionally as the grid feature is optional, it has a PhantomData field of that type to make type inference work.

Changed

  • PrintTree and RoundTree: use Layout instead of &Layout (#849).
  • Renamed TrackSizingFunction to GridTemplateComponent
  • Renamed NonRepeatedTrackSizingFunction to TrackSizingFunction
  • The Repeat variant of GridTemplateComponent now contains a new GridTemplateRepetition struct, which allows line names to be specifed in addition to tracks.
  • The way that grid styles are exposed in the low-level API is now a lot more generic with many associated types.

Added

  • GridTemplateArea struct and Style::grid_template_areas field
  • Style::grid_template_column_names and Style::grid_template_row_names fields. If non-empty, these should have length of exactly one greater than the corresponding grid_template_column/grid_template_rows style.
2025-06-08 22:41:24
taffy

v0.8.3

Fixed

  • Fix serde feature on 32bit targets (#845)