1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
mod builder;
mod display;

use super::*;

#[derive(Copy, Clone, Debug)]
pub enum LengthResolver {
    Px(f32),
    Rem(f32),
    Percent(f32),
    Unit(isize),
    Fraction(usize, usize),
}

#[derive(Copy, Clone, Debug)]
enum LengthUnit {
    Min,
    Max,
    Fit,
    Full,
    Auto,
    Screen,
    Px(f32),
    Rem(f32),
    Unit(usize),
    Fraction(usize, usize),
    Percent(f32),
}

/// https://tailwindcss.com/docs/height
#[derive(Copy, Clone, Debug)]
pub enum TailwindSizingKind {
    #[doc = include_str!("min-height.md")]
    Width,
    #[doc = include_str!("min-height.md")]
    MinWidth,
    #[doc = include_str!("min-height.md")]
    MaxWidth,
    #[doc = include_str!("min-height.md")]
    Height,
    #[doc = include_str!("min-height.md")]
    MinHeight,
    #[doc = include_str!("min-height.md")]
    MaxHeight,
}

/// https://tailwindcss.com/docs/height
#[derive(Copy, Clone, Debug)]
pub struct TailwindSizing {
    kind: TailwindSizingKind,
    size: LengthUnit,
}