pub enum Overflow {
Visible,
Hidden,
Scroll,
}
Expand description
How children overflowing their container should affect layout
In CSS the primary effect of this property is to control whether contents of a parent container that overflow that container should be displayed anyway, be clipped, or trigger the container to become a scroll container. However it also has secondary effects on layout, the main ones being:
- The automatic minimum size Flexbox/CSS Grid items with non-
Visible
overflow is0
rather than being content based Overflow::Scroll
nodes have space in the layout reserved for a scrollbar (width controlled by thescrollbar_width
property)
In Taffy, we only implement the layout related secondary effects as we are not concerned with drawing/painting. The amount of space reserved for
a scrollbar is controlled by the scrollbar_width
property. If this is 0
then Scroll
behaves identically to Hidden
.
Variants§
Visible
The automatic minimum size of this node as a flexbox/grid item should be based on the size of it’s content.
Hidden
The automatic minimum size of this node as a flexbox/grid item should be 0
.
Scroll
The automatic minimum size of this node as a flexbox/grid item should be 0
. Additionally, space should be reserved
for a scrollbar. The amount of space reserved is controlled by the scrollbar_width
property.
Trait Implementations§
impl Copy for Overflow
impl Eq for Overflow
impl StructuralEq for Overflow
impl StructuralPartialEq for Overflow
Auto Trait Implementations§
impl RefUnwindSafe for Overflow
impl Send for Overflow
impl Sync for Overflow
impl Unpin for Overflow
impl UnwindSafe for Overflow
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.