package toffee
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9
doc/toffee.style/Style/Overflow/index.html
Module Style.OverflowSource
CSS overflow property.
The overflow property controls how content that overflows a container affects layout. In toffee, overflow primarily impacts the automatic minimum size calculation for Flexbox and CSS Grid items and controls scrollbar space reservation.
Overflow has two key layout effects:
- The automatic minimum size of Flexbox and Grid items with non-
Visibleoverflow is0rather than content-based. Scrolloverflow reserves space for a scrollbar, controlled by thescrollbar_widthproperty.
See CSS overflow documentation.
type t = | Visible(*Content-based automatic minimum size. Overflowing content contributes to parent scroll region.
*)| Clip(*Content-based automatic minimum size. Overflowing content does not contribute to parent scroll region.
*)| Hidden(*Zero automatic minimum size. Overflowing content does not contribute to parent scroll region.
*)| Scroll(*Zero automatic minimum size with scrollbar space reserved. Overflowing content does not contribute to parent scroll region.
*)
is_container overflow returns true if overflow contains its contents.
Returns true for Hidden and Scroll, false for Visible and Clip.
to_automatic_min_size overflow returns the automatic minimum size for overflow.
Returns Dimension.zero for Hidden and Scroll, Dimension.auto for Visible and Clip. This determines the automatic minimum size of Flexbox and CSS Grid items.
pp fmt overflow formats overflow for display.