Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GridTrackSize

The size of a single CSS Grid track (a column or a row), as used by grid-template-columns, grid-template-rows, grid-auto-columns and grid-auto-rows.
Read time 1 minuteLast updated 6 days ago

Definition

public struct GridTrackSize : IEquatable<GridTrackSize>

Remarks

A track size is a single sizing function (e.g.
100px
,
1fr
,
auto
), a
minmax(min, max)
pair, or
fit-content(length)
. The layout of this struct mirrors the native
GridTrackSize
and must stay blittable.

Properties

Property

Description

isAutoFillTrue when this track is a
repeat(auto-fill, …)
track.
isAutoFitTrue when this track is a
repeat(auto-fit, …)
track.
isFitContentTrue when this track is a
fit-content()
sizing function.
isMinmaxTrue when this track is a
minmax()
sizing function.
maxUnitThe maximum sizing unit (or the single unit for a plain track).
maxValueThe maximum sizing value (or the single value for a plain track).
minUnitThe minimum sizing unit.
minValueThe minimum sizing value.

Static Methods

Method

Description

AutoAn
auto
track.
FitContentA
fit-content(length)
track.
FractionA flexible
fr
track.
MaxContentA
max-content
track.
MinContentA
min-content
track.
MinmaxA
minmax(min, max)
track.
PercentA percentage track.
PixelsA fixed pixel track.
RepeatAutoFillA
repeat(auto-fill, track)
track. The repeat count is resolved from the container size.
RepeatAutoFitA
repeat(auto-fit, track)
track: like auto-fill, but empty tracks collapse to 0.