package toffee
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9
doc/toffee.style/Style/Grid_template_area/index.html
Module Style.Grid_template_areaSource
CSS grid template areas.
A grid template area defines a named rectangular region in a CSS grid. Named areas allow grid items to be positioned using semantic identifiers rather than numeric line indices. Multiple grid items can reference the same area name.
type t = {name : string;(*The name identifying this grid area. Area names must match across all rows they span to form a valid rectangular region.
*)row_start : int;(*The starting row line index in grid coordinates. Uses 1-based indexing.
*)row_end : int;(*The ending row line index in grid coordinates. Exclusive bound using 1-based indexing.
*)column_start : int;(*The starting column line index in grid coordinates. Uses 1-based indexing.
*)column_end : int;(*The ending column line index in grid coordinates. Exclusive bound using 1-based indexing.
*)
}A named grid area.
Invariant: row_start < row_end and column_start < column_end for valid rectangular regions.
Constructors
val make :
name:string ->
row_start:int ->
row_end:int ->
column_start:int ->
column_end:int ->
tmake ~name ~row_start ~row_end ~column_start ~column_end creates a grid area.
Coordinates use 1-based indexing. The row_end and column_end values are exclusive bounds.
Precondition: row_start < row_end and column_start < column_end. This is not validated; invalid coordinates may cause incorrect layout behavior.
Accessors
Comparison
equal a b tests structural equality of grid areas.
Two areas are equal if all their fields match.