Skip to main content

style/values/specified/
column.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5//! Specified types for the column properties.
6
7use crate::derives::*;
8use crate::values::generics::column::GenericColumnCount;
9use crate::values::specified::PositiveInteger;
10
11/// A specified type for `column-count` values.
12pub type ColumnCount = GenericColumnCount<PositiveInteger>;
13
14/// https://drafts.csswg.org/css-multicol/#propdef-column-fill
15#[allow(missing_docs)]
16#[derive(
17    Clone,
18    Copy,
19    Debug,
20    Deserialize,
21    Eq,
22    FromPrimitive,
23    Hash,
24    MallocSizeOf,
25    Parse,
26    PartialEq,
27    Serialize,
28    SpecifiedValueInfo,
29    ToComputedValue,
30    ToCss,
31    ToResolvedValue,
32    ToShmem,
33    ToTyped,
34)]
35#[repr(u8)]
36pub enum ColumnFill {
37    Balance,
38    Auto,
39}
40
41/// https://drafts.csswg.org/css-multicol/#propdef-column-span
42#[allow(missing_docs)]
43#[derive(
44    Clone,
45    Copy,
46    Debug,
47    Deserialize,
48    Eq,
49    FromPrimitive,
50    Hash,
51    MallocSizeOf,
52    Parse,
53    PartialEq,
54    Serialize,
55    SpecifiedValueInfo,
56    ToComputedValue,
57    ToCss,
58    ToResolvedValue,
59    ToShmem,
60    ToTyped,
61)]
62#[repr(u8)]
63pub enum ColumnSpan {
64    None,
65    All,
66}