package toffee
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
CSS layout engine for OCaml (Flexbox, Grid, Block)
Install
dune-project
Dependency
Authors
Maintainers
Sources
mosaic-0.1.0.tbz
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9
doc/src/toffee.style/alignment.ml.html
Source file alignment.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95module Align_items = struct type t = | Start (* Items are packed toward the start of the axis *) | End (* Items are packed toward the end of the axis *) | Flex_start (* Items are packed towards the flex-relative start of the axis. For flex containers with flex_direction RowReverse or ColumnReverse this is equivalent to End. In all other cases it is equivalent to Start. *) | Flex_end (* Items are packed towards the flex-relative end of the axis. For flex containers with flex_direction RowReverse or ColumnReverse this is equivalent to Start. In all other cases it is equivalent to End. *) | Center (* Items are packed along the center of the cross axis *) | Baseline (* Items are aligned such as their baselines align *) | Stretch (* Stretch to fill the container *) let default = Stretch let to_string (x : t) = match x with | Start -> "start" | End -> "end" | Flex_start -> "flex-start" | Flex_end -> "flex-end" | Center -> "center" | Baseline -> "baseline" | Stretch -> "stretch" end module Justify_items = struct type t = Align_items.t let default = Align_items.default let to_string = Align_items.to_string end module Align_self = struct type t = Align_items.t let default = Align_items.default let to_string = Align_items.to_string end module Justify_self = struct type t = Align_items.t let default = Align_items.default let to_string = Align_items.to_string end module Align_content = struct type t = | Start (* Items are packed toward the start of the axis *) | End (* Items are packed toward the end of the axis *) | Flex_start (* Items are packed towards the flex-relative start of the axis. For flex containers with flex_direction RowReverse or ColumnReverse this is equivalent to End. In all other cases it is equivalent to Start. *) | Flex_end (* Items are packed towards the flex-relative end of the axis. For flex containers with flex_direction RowReverse or ColumnReverse this is equivalent to Start. In all other cases it is equivalent to End. *) | Center (* Items are centered around the middle of the axis *) | Stretch (* Items are stretched to fill the container *) | Space_between (* The first and last items are aligned flush with the edges of the container (no gap) The gap between items is distributed evenly. *) | Space_evenly (* The gap between the first and last items is exactly THE SAME as the gap between items. The gaps are distributed evenly *) | Space_around (* The gap between the first and last items is exactly HALF the gap between items. The gaps are distributed evenly in proportion to these ratios. *) let default = Stretch let to_string (x : t) = match x with | Start -> "start" | End -> "end" | Flex_start -> "flex-start" | Flex_end -> "flex-end" | Center -> "center" | Stretch -> "stretch" | Space_between -> "space-between" | Space_evenly -> "space-evenly" | Space_around -> "space-around" end module Justify_content = struct type t = Align_content.t let default = Align_content.Flex_start let to_string = Align_content.to_string end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>