#[repr(C)]pub enum LayoutOverflow {
Scroll = 0,
Auto = 1,
Hidden = 2,
Visible = 3,
Clip = 4,
}Expand description
Represents an overflow-x or overflow-y property.
Determines what to do when content overflows an element’s box.
Variants§
Scroll = 0
Always shows a scroll bar, overflows on scroll.
Auto = 1
Shows a scroll bar only when content overflows.
Hidden = 2
Clips overflowing content. The rest of the content will be invisible.
Visible = 3
Content is not clipped and renders outside the element’s box. This is the CSS default.
Clip = 4
Similar to hidden, clips the content at the box’s edge.
Implementations§
Source§impl LayoutOverflow
impl LayoutOverflow
Sourcepub const fn needs_scrollbar(&self, currently_overflowing: bool) -> bool
pub const fn needs_scrollbar(&self, currently_overflowing: bool) -> bool
Returns whether this overflow value requires a scrollbar to be displayed.
overflow: scrollalways shows the scrollbar.overflow: autoonly shows the scrollbar if the content is currently overflowing.overflow: hidden,overflow: visible, andoverflow: clipdo not show any scrollbars.
Sourcepub const fn is_clipped(&self) -> bool
pub const fn is_clipped(&self) -> bool
Returns true if this overflow value clips content (everything except visible).
Sourcepub fn is_overflow_visible(&self) -> bool
pub fn is_overflow_visible(&self) -> bool
Returns true if the overflow type is visible, which is the only
overflow type that doesn’t clip its children.
Returns true if the overflow type is hidden.
Sourcepub const fn resolve_computed(self, other_axis: Self) -> Self
pub const fn resolve_computed(self, other_axis: Self) -> Self
Resolves the computed value per CSS Overflow 3 § 3.1: visible/clip values compute to auto/hidden (respectively) if the other axis is neither visible nor clip.
Trait Implementations§
Source§impl Clone for LayoutOverflow
impl Clone for LayoutOverflow
Source§fn clone(&self) -> LayoutOverflow
fn clone(&self) -> LayoutOverflow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more