#[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 fn needs_scrollbar(&self, currently_overflowing: bool) -> bool
pub 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 fn is_clipped(&self) -> bool
pub 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 fn resolve_computed(self, other_axis: LayoutOverflow) -> LayoutOverflow
pub fn resolve_computed(self, other_axis: LayoutOverflow) -> LayoutOverflow
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 moreSource§impl Debug for LayoutOverflow
impl Debug for LayoutOverflow
Source§impl Default for LayoutOverflow
impl Default for LayoutOverflow
Source§fn default() -> LayoutOverflow
fn default() -> LayoutOverflow
Source§impl FormatAsRustCode for LayoutOverflow
impl FormatAsRustCode for LayoutOverflow
fn format_as_rust_code(&self, _tabs: usize) -> String
Source§impl Hash for LayoutOverflow
impl Hash for LayoutOverflow
Source§impl Ord for LayoutOverflow
impl Ord for LayoutOverflow
Source§fn cmp(&self, other: &LayoutOverflow) -> Ordering
fn cmp(&self, other: &LayoutOverflow) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for LayoutOverflow
impl PartialEq for LayoutOverflow
Source§fn eq(&self, other: &LayoutOverflow) -> bool
fn eq(&self, other: &LayoutOverflow) -> bool
self and other values to be equal, and is used by ==.