monks/overflow_y
The overflow-y CSS property sets what shows when content overflows a block-level element’s top and bottom edges. This may be nothing, a scroll bar, or the overflow content. This property may also be set by using the overflow shorthand property.
Values
pub const auto_: #(String, String)
- : Overflow content is clipped at the element’s padding box, and overflow content can be scrolled into view. Unlike
scroll, user agents display scroll bars only if the content is overflowing, hiding scroll bars by default. If content fits inside the element’s padding box, it looks the same as withvisible, but still establishes a new block-formatting context.> [!NOTE]> The keyword valueoverlayis a legacy value alias forauto. Withoverlay, the scroll bars are drawn on top of the content instead of taking up space.
pub const clip: #(String, String)
- : Overflow content is clipped at the element’s overflow clip edge that is defined using the
overflow-clip-marginproperty. As a result, content overflows the element’s padding box by the {{cssxref(“<length>”)}} value ofoverflow-clip-marginor by0pxif not set. The difference betweenclipandhiddenis that theclipkeyword also forbids all scrolling, including programmatic scrolling. No new formatting context is created. To establish a formatting context, useoverflow: clipalong with {{cssxref(“display”, “display: flow-root”, “#flow-root”)}}. The element box is not a scroll container.
pub const hidden: #(String, String)
- : Overflow content is clipped if necessary to fit vertically in the elements’ padding box. No scroll bars are provided.
pub const revert_layer: #(String, String)
pub const scroll: #(String, String)
- : Overflow content is clipped if necessary to fit vertically inside the element’s padding box. Browsers display scroll bars in the vertical direction whether or not any content is actually clipped. (This prevents scroll bars from appearing or disappearing when the content changes.) Printers may still print overflowing content.
pub fn var(variable: String) -> #(String, String)
Enter a variable name to be used for overflow-y.
It will be wrapped in var() and have -- prepended.