Packages

Type safe CSS-in-gleam using generated code

Current section

Files

Jump to
monks_of_style src monks columns.gleam
Raw

src/monks/columns.gleam

//// The **`columns`** [CSS](/en-US/docs/Web/CSS) shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths.
////
import monks_of_style.{length_to_string, type Length}
/// auto value of columns
pub const auto_ = #("columns", "auto")
pub const initial = #("columns", "initial")
pub const inherit = #("columns", "inherit")
pub const unset = #("columns", "unset")
pub const revert = #("columns", "revert")
pub const revert_layer = #("columns", "revert_layer")
/// length value of columns
pub fn length(value: Length) -> #(String, String) {
#("columns", length_to_string(value))
}
/// Enter a raw string value for columns
pub fn raw(value: String) -> #(String, String) {
#("columns", value)
}
/// Enter a variable name to be used for columns.
/// It will be wrapped in `var()` and have `--` prepended.
pub fn var(variable: String) -> #(String, String) {
#("columns", "var(--" <> variable <> ")")
}