package toffee
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9
doc/toffee.style/Style/Repetition_count/index.html
Module Style.Repetition_countSource
CSS Grid track repetition counts.
This module defines how track definitions repeat in CSS Grid layouts. Repetitions can be explicit (repeat N times) or automatic (fill/fit the container).
See CSS Grid Level 1 - Auto-repeat for the specification of auto-repeated track definitions.
Constructors
count n creates a repetition count of exactly n times.
Raises Invalid_argument if n is not positive.
Predicates
Comparison and Equality
equal a b returns true if a and b represent the same repetition count.
compare a b provides a total ordering over repetition counts. Count values are ordered first by their integer value, followed by Auto_fill, then Auto_fit.
Conversion
to_string t converts t to its CSS representation. Count n yields the integer as a string, Auto_fill yields "auto-fill", and Auto_fit yields "auto-fit".
of_string s parses s as a repetition count. Accepts "auto-fit", "auto-fill", or a positive integer string. Returns Error msg if s is invalid.
pp fmt t outputs t to fmt using to_string.