package toffee
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9
doc/toffee.style/Style/index.html
Module StyleSource
Style types for CSS layout.
This module provides CSS style properties for layout computation, including dimensions, positioning, flexbox, and grid layout.
Type for calc resolver function.
Length types
Compact representation of CSS length values.
CSS length-percentage values.
CSS length-percentage-auto values.
CSS dimension values supporting length, percentage, auto, and calc().
Layout control types
CSS display property controlling box generation and child layout algorithm.
CSS box-sizing property.
CSS box generation mode.
CSS text-align property for block layout.
Flexbox types
CSS flex-direction property for flexbox layout.
Alignment types
Controls how child nodes are aligned.
Controls how child nodes are aligned.
Controls alignment of an individual child node.
Controls alignment of an individual child node.
Sets the distribution of space between and around content items.
Sets the distribution of space between and around content items.
Grid types
CSS grid-auto-flow property.
CSS Grid item placement specification.
Grid track repetition specification.
CSS grid template areas.
Grid template component definitions.
CSS Grid track repetition counts.
CSS Grid track sizing functions.
Type aliases
Alias for Length_percentage.t.
Alias for Length_percentage_auto.t.
Alias for Dimension.t.
Alias for Position.t.
Alias for Overflow.t.
Alias for Box_sizing.t.
Alias for Box_generation_mode.t.
Alias for Text_align.t.
Alias for Flex_direction.t.
Alias for Flex_wrap.t.
Alias for Align_items.t.
Alias for Align_content.t.
Alias for Justify_items.t.
Alias for Align_self.t.
Alias for Justify_self.t.
Alias for Justify_content.t.
Alias for Grid_auto_flow.t.
Alias for Grid_placement.t.
Alias for Track_sizing_function.t.
Alias for Repetition_count.t.
Alias for Grid_repetition.t.
Alias for Grid_template_component.t.
Alias for Grid_template_area.t.
Convenience constructors
Main Style type
The main style struct representing CSS style properties.
Constructor
val make :
?display:display ->
?box_sizing:box_sizing ->
?position:position ->
?overflow:overflow Geometry.point ->
?scrollbar_width:float ->
?text_align:text_align ->
?inset:length_percentage_auto Geometry.rect ->
?size:dimension Geometry.size ->
?min_size:dimension Geometry.size ->
?max_size:dimension Geometry.size ->
?aspect_ratio:float ->
?margin:length_percentage_auto Geometry.rect ->
?padding:length_percentage Geometry.rect ->
?border:length_percentage Geometry.rect ->
?gap:length_percentage Geometry.size ->
?align_items:align_items ->
?align_self:align_self ->
?align_content:align_content ->
?justify_items:justify_items ->
?justify_self:justify_self ->
?justify_content:justify_content ->
?flex_direction:flex_direction ->
?flex_wrap:flex_wrap ->
?flex_grow:float ->
?flex_shrink:float ->
?flex_basis:dimension ->
?grid_template_rows:grid_template_component list ->
?grid_template_columns:grid_template_component list ->
?grid_auto_rows:track_sizing_function list ->
?grid_auto_columns:track_sizing_function list ->
?grid_auto_flow:grid_auto_flow ->
?grid_template_areas:grid_template_area list ->
?grid_template_column_names:string list list ->
?grid_template_row_names:string list list ->
?grid_row:grid_placement Geometry.line ->
?grid_column:grid_placement Geometry.line ->
unit ->
tmake ... creates a style with optional parameters, defaulting to default for unspecified fields.
Accessors
Property accessors return the current value of style properties. See the corresponding module for property semantics.
box_generation_mode t returns the box generation mode. See Box_generation_mode.
set_box_generation_mode mode t returns a style with updated box generation mode.
is_compressible_replaced t returns true if the item is a compressible replaced element.
text_align t returns the text alignment. See Text_align.
item_is_replaced t returns true if the item is a replaced element.
box_sizing t returns the box sizing mode. See Box_sizing.
overflow t returns the overflow behavior for both axes. See Overflow.
inset t returns the inset values (top, right, bottom, left).
size t returns the explicit size (width, height). See Dimension.
min_size t returns the minimum size constraints.
max_size t returns the maximum size constraints.
aspect_ratio t returns the aspect ratio constraint, if any.
margin t returns the margin values. See Length_percentage_auto.
padding t returns the padding values. See Length_percentage.
border t returns the border widths.
gap t returns the gap between items (row_gap, column_gap).
align_items t returns the cross-axis alignment for children. See Align_items.
align_self t returns the self cross-axis alignment override. See Align_self.
align_content t returns the content alignment in the cross axis. See Align_content.
justify_items t returns the inline-axis alignment for children (Grid only). See Justify_items.
justify_self t returns the self inline-axis alignment override. See Justify_self.
justify_content t returns the content alignment in the main/inline axis. See Justify_content.
flex_direction t returns the flex container direction. See Flex_direction.
flex_basis t returns the initial main size before growing/shrinking.
grid_template_rows t returns the explicit row track definitions. See Grid_template_component.
grid_template_columns t returns the explicit column track definitions.
grid_auto_rows t returns the implicit row track sizing. See Track_sizing_function.
grid_auto_columns t returns the implicit column track sizing.
grid_auto_flow t returns the auto-placement algorithm. See Grid_auto_flow.
grid_template_areas t returns the named grid areas. See Grid_template_area.
grid_template_column_names t returns the named column lines.
grid_template_row_names t returns the named row lines.
grid_row t returns the row placement (start, end). See Grid_placement.
grid_column t returns the column placement (start, end).
Functional updates
Setters return a new style with the specified property updated. All other properties remain unchanged.
set_position v t returns a style with updated positioning mode.
set_overflow v t returns a style with updated overflow behavior.
set_scrollbar_width v t returns a style with updated scrollbar width.
set_text_align v t returns a style with updated text alignment.
set_inset v t returns a style with updated inset values.
set_size v t returns a style with updated explicit size.
set_width v t returns a style with size.width updated to v.
set_height v t returns a style with size.height updated to v.
set_min_size v t returns a style with updated minimum size.
set_min_width v t returns a style with min_size.width updated to v.
set_min_height v t returns a style with min_size.height updated to v.
set_max_size v t returns a style with updated maximum size.
set_max_width v t returns a style with max_size.width updated to v.
set_max_height v t returns a style with max_size.height updated to v.
set_aspect_ratio v t returns a style with updated aspect ratio.
set_margin v t returns a style with updated margin values.
set_margin_left v t returns a style with margin.left updated to v.
set_margin_right v t returns a style with margin.right updated to v.
set_margin_top v t returns a style with margin.top updated to v.
set_margin_bottom v t returns a style with margin.bottom updated to v.
set_margin_x v t returns a style with both margin.left and margin.right updated to v.
set_margin_y v t returns a style with both margin.top and margin.bottom updated to v.
set_padding v t returns a style with updated padding values.
set_padding_left v t returns a style with padding.left updated to v.
set_padding_right v t returns a style with padding.right updated to v.
set_padding_top v t returns a style with padding.top updated to v.
set_padding_bottom v t returns a style with padding.bottom updated to v.
set_padding_x v t returns a style with both padding.left and padding.right updated to v.
set_padding_y v t returns a style with both padding.top and padding.bottom updated to v.
set_border v t returns a style with updated border widths.
set_gap v t returns a style with updated gap between items.
set_align_items v t returns a style with updated child alignment.
set_align_self v t returns a style with updated self alignment.
set_align_content v t returns a style with updated content alignment.
set_justify_items v t returns a style with updated justify items.
set_justify_self v t returns a style with updated justify self.
set_justify_content v t returns a style with updated justify content.
set_flex_direction v t returns a style with updated flex direction.
set_flex_wrap v t returns a style with updated flex wrap.
set_flex_grow v t returns a style with updated flex grow factor.
set_flex_shrink v t returns a style with updated flex shrink factor.
set_flex_basis v t returns a style with updated flex basis.
set_grid_template_rows v t returns a style with updated row templates.
set_grid_template_columns v t returns a style with updated column templates.
set_grid_auto_rows v t returns a style with updated auto row sizing.
set_grid_auto_columns v t returns a style with updated auto column sizing.
set_grid_auto_flow v t returns a style with updated auto-flow algorithm.
set_grid_template_areas v t returns a style with updated named areas.
set_grid_template_column_names v t returns a style with updated column line names.
set_grid_template_row_names v t returns a style with updated row line names.
set_grid_row v t returns a style with updated row placement.
set_grid_column v t returns a style with updated column placement.