tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 788HTML 740Markdown 12TOML 62536 Definiciones

⎇ float-layout src/style/float.rs Rust · 33 líneas · 916 B Historia Quién tocó qué crudo

Float layout WIP 22a79ba0e · Nico Burns ·

1//! Style types for float layout
2
3/// Floats a box to the left or right.
4/// This property only applies to children of a block layout
5///
6/// See <https://developer.mozilla.org/en-US/docs/Web/CSS/float>
7#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
8pub enum Float {
9    /// The box is floated to the left
10    Left,
11    /// The box is floated to the right
12    Right,
13    /// The box is not floated
14    #[default]
15    None,
16}
17
18/// Gives a box "clearance", which moves it below floated boxes which precede
19/// it in the tree.
20///
21/// See <https://developer.mozilla.org/en-US/docs/Web/CSS/clear>
22#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
23pub enum Clear {
24    /// The box clears left-floated boxes
25    Left,
26    /// The box clears right-floated boxes
27    Right,
28    /// The box clears boxes floated in either direction
29    Both,
30    /// The box does not clear floated boxes
31    #[default]
32    None,
33}