package toffee
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9
doc/toffee.style/Style/Grid_repetition/index.html
Module Style.Grid_repetitionSource
Grid track repetition specification.
Represents a repeat() clause in CSS Grid grid-template-rows and grid-template-columns definitions. A repetition specifies a count (either a fixed integer or auto-fill/auto-fit), a list of track sizing functions to repeat, and associated line names for those tracks.
See Auto-repeat specification for details on auto-repeated track definitions.
type t = {count : Repetition_count.t;(*The number of times the tracks are repeated. May be a fixed count or an auto-repeat mode (auto-fill or auto-fit).
*)tracks : Track_sizing_function.t list;(*The list of track sizing functions to repeat.
*)line_names : string list list;(*Line names associated with each track boundary. The outer list corresponds to the track boundaries (length is
*)List.length tracks + 1), and each inner list contains the names for that boundary.
}A grid track repetition specification.
val make :
count:Repetition_count.t ->
tracks:Track_sizing_function.t list ->
line_names:string list list ->
tmake ~count ~tracks ~line_names creates a grid track repetition specification.
Precondition: line_names should have List.length tracks + 1 elements to cover all track boundaries. This is not validated; mismatched lengths may cause incorrect behavior during grid layout.
count t returns the repetition count.
tracks t returns the list of track sizing functions.
line_names t returns the line names for track boundaries.
is_auto_repetition t returns true if the repetition uses auto-fill or auto-fit, false for fixed counts.