monks/scroll_snap_type
The scroll-snap-type CSS property is set on a {{glossary(“scroll container”)}}, opting it into scroll snapping by setting the direction and strictness of snap point enforcement within the snap port.
Values
pub const block: #(String, String)
- : The scroll container snaps to snap positions in its block axis only.
pub const both: #(String, String)
- : The scroll container snaps to snap positions in both of its axes independently (potentially snapping to different elements in each axis).
pub const inline: #(String, String)
- : The scroll container snaps to snap positions in its inline axis only.
pub const mandatory: #(String, String)
- : The visual viewport of this scroll container must snap to a snap position if it isn’t currently scrolled.
pub const none: #(String, String)
- : When the visual {{Glossary(“viewport”)}} of this scroll container is scrolled, it must ignore snap points.
pub const proximity: #(String, String)
- : The visual viewport of this scroll container may snap to a snap position if it isn’t currently scrolled. The user agent decides if it snaps or not based on scroll parameters. This is the default snap strictness if any snap axis is specified.
pub fn raw(value: String) -> #(String, String)
Enter a raw string value for scroll-snap-type
pub const revert_layer: #(String, String)
pub fn var(variable: String) -> #(String, String)
Enter a variable name to be used for scroll-snap-type.
It will be wrapped in var() and have -- prepended.
pub const x: #(String, String)
- : The scroll container snaps to snap positions in its horizontal axis only.