Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

GridTrackSize

struct in UnityEngine.UIElements

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

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.

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.