diff --git a/Cargo.lock b/Cargo.lock index eea63e5..b8c2d18 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -189,7 +189,7 @@ dependencies = [ [[package]] name = "dominator-css-bindgen" -version = "0.1.1" +version = "0.2.0" dependencies = [ "case", "cssparser", @@ -247,7 +247,7 @@ dependencies = [ [[package]] name = "dwind" -version = "0.5.0" +version = "0.6.0" dependencies = [ "const_format", "dominator", @@ -272,7 +272,7 @@ dependencies = [ [[package]] name = "dwind-build" -version = "0.1.1" +version = "0.2.0" dependencies = [ "serde", "serde_json", @@ -280,7 +280,7 @@ dependencies = [ [[package]] name = "dwind-macros" -version = "0.3.0" +version = "0.4.0" dependencies = [ "const_format", "dominator", @@ -296,7 +296,7 @@ dependencies = [ [[package]] name = "dwui" -version = "0.7.0" +version = "0.7.1" dependencies = [ "const_format", "dominator", @@ -606,7 +606,7 @@ dependencies = [ [[package]] name = "modern-normalize-cssys" -version = "0.2.1" +version = "0.2.2" dependencies = [ "dominator", "dominator-css-bindgen", diff --git a/Cargo.toml b/Cargo.toml index bec8eb3..80b88bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [workspace] - resolver = "2" members = [ "crates/dominator-css-bindgen", "crates/dwind", - "crates/dwind-base", "crates/dwind-build", + "crates/dwind-base", + "crates/dwind-build", "crates/dwind-macros", "crates/dwui", "crates/example-html-macro", @@ -23,7 +23,7 @@ futures-signals = "0.3" futures-signals-component-macro = { version = "0.4.0", features = [ "dominator", ] } -gloo-timers = { version = "0.3.0", features = ["futures"]} +gloo-timers = { version = "0.3.0", features = ["futures"] } log = "0.4" matchit = "0.8" nom = "7.1" @@ -50,5 +50,5 @@ web-sys = { version = "0.3", features = [ "Navigator", "Url", "Window", - "HtmlSelectElement" + "HtmlSelectElement", ] } diff --git a/crates/dominator-css-bindgen/Cargo.toml b/crates/dominator-css-bindgen/Cargo.toml index 54801ea..885fd76 100644 --- a/crates/dominator-css-bindgen/Cargo.toml +++ b/crates/dominator-css-bindgen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dominator-css-bindgen" -version = "0.1.1" +version = "0.2.0" edition = "2021" description = "generate DOMINATOR rust bindings to use from your dwind based application" homepage = "https://github.com/JedimEmO/dwind" diff --git a/crates/dominator-css-bindgen/src/codegen/output_model.rs b/crates/dominator-css-bindgen/src/codegen/output_model.rs index e9476c8..b85b453 100644 --- a/crates/dominator-css-bindgen/src/codegen/output_model.rs +++ b/crates/dominator-css-bindgen/src/codegen/output_model.rs @@ -1,6 +1,5 @@ use crate::css::parse_css::{ParsedCssFile, ParsedSelector}; use cssparser::{CowRcStr, ToCss, Token}; -use quote::quote; use std::collections::HashMap; /// Represent a simple output class and its pseudo classes diff --git a/crates/dominator-css-bindgen/src/codegen/render_output_class.rs b/crates/dominator-css-bindgen/src/codegen/render_output_class.rs index e6a0ff3..2aba367 100644 --- a/crates/dominator-css-bindgen/src/codegen/render_output_class.rs +++ b/crates/dominator-css-bindgen/src/codegen/render_output_class.rs @@ -88,6 +88,8 @@ pub fn render_output_class(output_class: OutputClass) -> TokenStream { .identity .to_string() .replace("-", "_") + .replace(".", "_") + .replace("/", "_") .to_uppercase(); let name_lower = name.to_lowercase(); diff --git a/crates/dominator-css-bindgen/src/codegen/render_variables.rs b/crates/dominator-css-bindgen/src/codegen/render_variables.rs index 5ac6b94..79133c9 100644 --- a/crates/dominator-css-bindgen/src/codegen/render_variables.rs +++ b/crates/dominator-css-bindgen/src/codegen/render_variables.rs @@ -1,7 +1,7 @@ use case::CaseExt; use proc_macro2::{Ident, Span, TokenStream}; use quote::quote; -use std::collections::{HashMap, HashSet}; +use std::collections::HashMap; pub fn render_variable_definitions(module_name: &str, variable_names: Vec) -> String { let variable_names = variable_names @@ -74,6 +74,7 @@ fn render_struct_of_variable_names(module_name: &str, variable_names: Vec String { let mut out: Vec = vec![]; + out.clear(); #(#raw_string_exprs)* @@ -84,5 +85,5 @@ fn render_struct_of_variable_names(module_name: &str, variable_names: Vec String { - ident.replace("-", "_") + ident.replace("-", "_").replace(".", "_").replace("/", "_") } diff --git a/crates/dwind-build/Cargo.toml b/crates/dwind-build/Cargo.toml index 4e2fed4..f72ce52 100644 --- a/crates/dwind-build/Cargo.toml +++ b/crates/dwind-build/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dwind-build" -version = "0.1.1" +version = "0.2.0" edition = "2021" description = "utility crate for building DWIND color swatches etc." homepage = "https://github.com/JedimEmO/dwind" diff --git a/crates/dwind-build/src/colors.rs b/crates/dwind-build/src/colors.rs index cd46487..c1aee19 100644 --- a/crates/dwind-build/src/colors.rs +++ b/crates/dwind-build/src/colors.rs @@ -42,6 +42,13 @@ pub fn render_color_json_file_to_rust_file( let _ = colors_out_file .write(render_color(color, "gradient-to", "gradient-to-").as_bytes()) .unwrap(); + let _ = colors_out_file + .write(render_color(color, "from", "gradient-from-").as_bytes()) + .unwrap(); + + let _ = colors_out_file + .write(render_color(color, "to", "gradient-to-").as_bytes()) + .unwrap(); let _ = colors_out_file .write(render_color(color, "fill", "fill-").as_bytes()) @@ -50,6 +57,10 @@ pub fn render_color_json_file_to_rust_file( let _ = colors_out_file .write(render_color(color, "stroke", "stroke-").as_bytes()) .unwrap(); + + let _ = colors_out_file + .write(render_color(color, "ring", "ring-").as_bytes()) + .unwrap(); } let _ = colors_out_file diff --git a/crates/dwind-macros/Cargo.toml b/crates/dwind-macros/Cargo.toml index 9178adb..069562b 100644 --- a/crates/dwind-macros/Cargo.toml +++ b/crates/dwind-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dwind-macros" -version = "0.3.0" +version = "0.4.0" edition = "2021" description = "Macros used by the dwind crate for applying dominator classes to components using a custom language" homepage = "https://github.com/JedimEmO/dwind" diff --git a/crates/dwind-macros/src/codegen/mod.rs b/crates/dwind-macros/src/codegen/mod.rs index 430cd80..bc1458b 100644 --- a/crates/dwind-macros/src/codegen/mod.rs +++ b/crates/dwind-macros/src/codegen/mod.rs @@ -63,7 +63,10 @@ pub fn render_dwind_class( } if class.pseudo_classes.is_empty() && class.variant.is_none() { - let class_ident = Ident::new(&class.class_name.to_uppercase(), Span::call_site()); + let class_ident = Ident::new( + &class_name_to_struct_identifier(&class.class_name).to_uppercase(), + Span::call_site(), + ); (quote! { &* #class_ident }, breakpoint, false) } else { diff --git a/crates/dwind-macros/src/grammar/mod.rs b/crates/dwind-macros/src/grammar/mod.rs index 9b0fe5d..a35d0c5 100644 --- a/crates/dwind-macros/src/grammar/mod.rs +++ b/crates/dwind-macros/src/grammar/mod.rs @@ -6,7 +6,6 @@ use nom::combinator::opt; use nom::multi::{many0, separated_list1}; use nom::sequence::{delimited, terminated}; use nom::IResult; -use std::env::var; use crate::codegen::BreakpointInfo; diff --git a/crates/dwind-macros/src/lib.rs b/crates/dwind-macros/src/lib.rs index 40b242e..93684d8 100644 --- a/crates/dwind-macros/src/lib.rs +++ b/crates/dwind-macros/src/lib.rs @@ -9,10 +9,7 @@ use dwind_base::media_queries::Breakpoint; use macro_inputs::{DwGenerateInput, DwGenerateMapInput, DwindInput}; use proc_macro::TokenStream; use quote::quote; -use std::future::Future; -use std::pin::Pin; use std::rc::Rc; -use std::task::{Context, Poll}; /// Use dwind-macros macros on your DOMINATOR component /// @@ -48,7 +45,7 @@ pub fn dwclass(input: TokenStream) -> TokenStream { let v = Rc::new(Some("")); - v.as_ref().as_ref().map(|v| {}); + v.as_ref().as_ref().map(|_v| {}); let classes = normal_classes.into_iter().filter_map(|v| v).map(|(class, breakpoint)| { if let Some(breakpoint) = breakpoint { diff --git a/crates/dwind/Cargo.toml b/crates/dwind/Cargo.toml index 044ea13..1627143 100644 --- a/crates/dwind/Cargo.toml +++ b/crates/dwind/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dwind" -version = "0.5.0" +version = "0.6.0" edition = "2021" description = "Style your DOMINATOR applications using a tailwind-like syntax and utility class collection!" homepage = "https://github.com/JedimEmO/dwind" @@ -9,18 +9,18 @@ license = "MIT" keywords = ["web", "wasm", "css", "style"] [dependencies] -const_format = { workspace = true} -dominator = { workspace = true} -dominator-css-bindgen = { path = "../dominator-css-bindgen", version = "0.1.1" } +const_format = { workspace = true } +dominator = { workspace = true } +dominator-css-bindgen = { path = "../dominator-css-bindgen", version = "0.2.0" } dwind-base = { path = "../dwind-base", version = "0.1.1" } -dwind-macros = { path = "../dwind-macros", version = "0.3.0" } -futures-signals = { workspace = true} +dwind-macros = { path = "../dwind-macros", version = "0.4.0" } +futures-signals = { workspace = true } modern-normalize-cssys = { path = "../modern-normalize-cssys", version = "0.2.1" } -once_cell = { workspace = true} +once_cell = { workspace = true } serde = { workspace = true, features = ["derive"] } [build-dependencies] -dominator-css-bindgen = { path = "../dominator-css-bindgen", version = "0.1.1" } -dwind-build = { path = "../dwind-build", version = "0.1.1" } -serde = { workspace = true} -serde_json = { workspace = true} +dominator-css-bindgen = { path = "../dominator-css-bindgen", version = "0.2.0" } +dwind-build = { path = "../dwind-build", version = "0.2.0" } +serde = { workspace = true } +serde_json = { workspace = true } diff --git a/crates/dwind/build.rs b/crates/dwind/build.rs index 0cc1670..3743eef 100644 --- a/crates/dwind/build.rs +++ b/crates/dwind/build.rs @@ -19,6 +19,7 @@ fn main() { "resources/css/typography.css", "resources/css/transforms.css", "resources/css/transition.css", + "resources/css/animations.css", ]; let out_dir = env::var_os("OUT_DIR").unwrap(); diff --git a/crates/dwind/resources/css/animations.css b/crates/dwind/resources/css/animations.css new file mode 100644 index 0000000..6f5f1fe --- /dev/null +++ b/crates/dwind/resources/css/animations.css @@ -0,0 +1,59 @@ +/* Animation utilities */ + +.animate-none { + animation: none; +} + +.animate-spin { + animation: spin 1s linear infinite; +} + +.animate-ping { + animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; +} + +.animate-pulse { + animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; +} + +.animate-bounce { + animation: bounce 1s infinite; +} + +/* Keyframes */ + +@keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@keyframes ping { + 75%, 100% { + transform: scale(2); + opacity: 0; + } +} + +@keyframes pulse { + 0%, 100% { + opacity: 1; + } + 50% { + opacity: .5; + } +} + +@keyframes bounce { + 0%, 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8, 0, 1, 1); + } + 50% { + transform: translateY(0); + animation-timing-function: cubic-bezier(0, 0, 0.2, 1); + } +} \ No newline at end of file diff --git a/crates/dwind/resources/css/base.css b/crates/dwind/resources/css/base.css index fe4744d..9224a80 100644 --- a/crates/dwind/resources/css/base.css +++ b/crates/dwind/resources/css/base.css @@ -1,5 +1,9 @@ :root { color-scheme: dark; + --dw-ring-inset: ; + --dw-ring-offset-width: 0px; + --dw-ring-color: rgb(59 130 246 / 0.5); + --dw-gradient-stops: var(--dw-gradient-from), var(--dw-gradient-to); } html { diff --git a/crates/dwind/resources/css/borders.css b/crates/dwind/resources/css/borders.css index fb6b18e..0866568 100644 --- a/crates/dwind/resources/css/borders.css +++ b/crates/dwind/resources/css/borders.css @@ -38,6 +38,27 @@ border-left-width: 2px; } +/* Border color utilities */ +.border-inherit { + border-color: inherit; +} + +.border-current { + border-color: currentColor; +} + +.border-transparent { + border-color: transparent; +} + +.border-black { + border-color: rgb(0 0 0); +} + +.border-white { + border-color: rgb(255 255 255); +} + /* rounding */ diff --git a/crates/dwind/resources/css/box_shadow.css b/crates/dwind/resources/css/box_shadow.css index d5fed03..7278d86 100644 --- a/crates/dwind/resources/css/box_shadow.css +++ b/crates/dwind/resources/css/box_shadow.css @@ -29,4 +29,32 @@ .shadow-none { box-shadow: none; +} + +.ring-0 { + box-shadow: var(--dw-ring-inset) 0 0 0 calc(0px + var(--dw-ring-offset-width)) var(--dw-ring-color); +} + +.ring-1 { + box-shadow: var(--dw-ring-inset) 0 0 0 calc(1px + var(--dw-ring-offset-width)) var(--dw-ring-color); +} + +.ring-2 { + box-shadow: var(--dw-ring-inset) 0 0 0 calc(2px + var(--dw-ring-offset-width)) var(--dw-ring-color); +} + +.ring { + box-shadow: var(--dw-ring-inset) 0 0 0 calc(3px + var(--dw-ring-offset-width)) var(--dw-ring-color); +} + +.ring-4 { + box-shadow: var(--dw-ring-inset) 0 0 0 calc(4px + var(--dw-ring-offset-width)) var(--dw-ring-color); +} + +.ring-8 { + box-shadow: var(--dw-ring-inset) 0 0 0 calc(8px + var(--dw-ring-offset-width)) var(--dw-ring-color); +} + +.ring-inset { + --dw-ring-inset: inset; } \ No newline at end of file diff --git a/crates/dwind/resources/css/colors.css b/crates/dwind/resources/css/colors.css index 5fe4e3c..77029c9 100644 --- a/crates/dwind/resources/css/colors.css +++ b/crates/dwind/resources/css/colors.css @@ -25,3 +25,43 @@ .linear-gradient-180 { background: linear-gradient(180deg, var(--dw-gradient-from), var(--dw-gradient-to)); } + +/* + Tailwind-style gradient directions +*/ + +.bg-none { + background-image: none; +} + +.bg-gradient-to-t { + background-image: linear-gradient(to top, var(--dw-gradient-stops)); +} + +.bg-gradient-to-tr { + background-image: linear-gradient(to top right, var(--dw-gradient-stops)); +} + +.bg-gradient-to-r { + background-image: linear-gradient(to right, var(--dw-gradient-stops)); +} + +.bg-gradient-to-br { + background-image: linear-gradient(to bottom right, var(--dw-gradient-stops)); +} + +.bg-gradient-to-b { + background-image: linear-gradient(to bottom, var(--dw-gradient-stops)); +} + +.bg-gradient-to-bl { + background-image: linear-gradient(to bottom left, var(--dw-gradient-stops)); +} + +.bg-gradient-to-l { + background-image: linear-gradient(to left, var(--dw-gradient-stops)); +} + +.bg-gradient-to-tl { + background-image: linear-gradient(to top left, var(--dw-gradient-stops)); +} diff --git a/crates/dwind/resources/css/flexbox_and_grid.css b/crates/dwind/resources/css/flexbox_and_grid.css index 506667f..8ed1815 100644 --- a/crates/dwind/resources/css/flexbox_and_grid.css +++ b/crates/dwind/resources/css/flexbox_and_grid.css @@ -254,6 +254,14 @@ flex-shrink: 0; } +.flex-shrink { + flex-shrink: 1; +} + +.flex-shrink-0 { + flex-shrink: 0; +} + /* Grid related classes */ @@ -974,7 +982,6 @@ Grid related classes grid-row-end: auto; } - /* Grid col/row */ @@ -1033,4 +1040,3 @@ Grid related classes .grid-col-7 { grid-column: 7; } - diff --git a/crates/dwind/resources/css/layout.css b/crates/dwind/resources/css/layout.css index c35b7e0..deb30f0 100644 --- a/crates/dwind/resources/css/layout.css +++ b/crates/dwind/resources/css/layout.css @@ -1,3 +1,79 @@ +.block { + display: block; +} + +.inline-block { + display: inline-block; +} + +.inline { + display: inline; +} + +.inline-flex { + display: inline-flex; +} + +.table { + display: table; +} + +.inline-table { + display: inline-table; +} + +.table-caption { + display: table-caption; +} + +.table-cell { + display: table-cell; +} + +.table-column { + display: table-column; +} + +.table-column-group { + display: table-column-group; +} + +.table-footer-group { + display: table-footer-group; +} + +.table-header-group { + display: table-header-group; +} + +.table-row-group { + display: table-row-group; +} + +.table-row { + display: table-row; +} + +.flow-root { + display: flow-root; +} + +.inline-grid { + display: inline-grid; +} + +.contents { + display: contents; +} + +.list-item { + display: list-item; +} + +.hidden { + display: none; +} + .overflow-auto { overflow: auto; } diff --git a/crates/dwind/resources/css/position.css b/crates/dwind/resources/css/position.css index 649c5da..535adba 100644 --- a/crates/dwind/resources/css/position.css +++ b/crates/dwind/resources/css/position.css @@ -14,21 +14,6 @@ position: sticky; } -.left-0 { - left: 0; -} - -.right-0 { - right: 0; -} - -.top-0 { - top: 0; -} - -.bottom-0 { - bottom: 0; -} .order-1 { order: 1; @@ -89,3 +74,31 @@ .order-none { order: 0; } + +.z-0 { + z-index: 0; +} + +.z-10 { + z-index: 10; +} + +.z-20 { + z-index: 20; +} + +.z-30 { + z-index: 30; +} + +.z-40 { + z-index: 40; +} + +.z-50 { + z-index: 50; +} + +.z-auto { + z-index: auto; +} diff --git a/crates/dwind/resources/css/spacing.css b/crates/dwind/resources/css/spacing.css index ca18067..575f16f 100644 --- a/crates/dwind/resources/css/spacing.css +++ b/crates/dwind/resources/css/spacing.css @@ -7,6 +7,11 @@ margin-right: auto; } +.mx-auto { + margin-left: auto; + margin-right: auto; +} + .m-y-auto { margin-top: auto; margin-bottom: auto; @@ -17,6 +22,10 @@ margin-left: auto; } +.ml-auto { + margin-left: auto; +} + .m-r-auto { margin-right: auto; } @@ -33,4 +42,222 @@ /* All sides margin */ .m-all-auto { margin: auto; -} \ No newline at end of file +} + +/* Space between utilities */ +.space-x-0 > * + * { + margin-left: 0px; +} +.space-y-0 > * + * { + margin-top: 0px; +} +.space-x-0-5 > * + * { + margin-left: 0.125rem; /* 2px */ +} +.space-y-0-5 > * + * { + margin-top: 0.125rem; /* 2px */ +} +.space-x-1 > * + * { + margin-left: 0.25rem; /* 4px */ +} +.space-y-1 > * + * { + margin-top: 0.25rem; /* 4px */ +} +.space-x-1-5 > * + * { + margin-left: 0.375rem; /* 6px */ +} +.space-y-1-5 > * + * { + margin-top: 0.375rem; /* 6px */ +} +.space-x-2 > * + * { + margin-left: 0.5rem; /* 8px */ +} +.space-y-2 > * + * { + margin-top: 0.5rem; /* 8px */ +} +.space-x-2-5 > * + * { + margin-left: 0.625rem; /* 10px */ +} +.space-y-2-5 > * + * { + margin-top: 0.625rem; /* 10px */ +} +.space-x-3 > * + * { + margin-left: 0.75rem; /* 12px */ +} +.space-y-3 > * + * { + margin-top: 0.75rem; /* 12px */ +} +.space-x-3-5 > * + * { + margin-left: 0.875rem; /* 14px */ +} +.space-y-3-5 > * + * { + margin-top: 0.875rem; /* 14px */ +} +.space-x-4 > * + * { + margin-left: 1rem; /* 16px */ +} +.space-y-4 > * + * { + margin-top: 1rem; /* 16px */ +} +.space-x-5 > * + * { + margin-left: 1.25rem; /* 20px */ +} +.space-y-5 > * + * { + margin-top: 1.25rem; /* 20px */ +} +.space-x-6 > * + * { + margin-left: 1.5rem; /* 24px */ +} +.space-y-6 > * + * { + margin-top: 1.5rem; /* 24px */ +} +.space-x-7 > * + * { + margin-left: 1.75rem; /* 28px */ +} +.space-y-7 > * + * { + margin-top: 1.75rem; /* 28px */ +} +.space-x-8 > * + * { + margin-left: 2rem; /* 32px */ +} +.space-y-8 > * + * { + margin-top: 2rem; /* 32px */ +} +.space-x-9 > * + * { + margin-left: 2.25rem; /* 36px */ +} +.space-y-9 > * + * { + margin-top: 2.25rem; /* 36px */ +} +.space-x-10 > * + * { + margin-left: 2.5rem; /* 40px */ +} +.space-y-10 > * + * { + margin-top: 2.5rem; /* 40px */ +} +.space-x-11 > * + * { + margin-left: 2.75rem; /* 44px */ +} +.space-y-11 > * + * { + margin-top: 2.75rem; /* 44px */ +} +.space-x-12 > * + * { + margin-left: 3rem; /* 48px */ +} +.space-y-12 > * + * { + margin-top: 3rem; /* 48px */ +} +.space-x-14 > * + * { + margin-left: 3.5rem; /* 56px */ +} +.space-y-14 > * + * { + margin-top: 3.5rem; /* 56px */ +} +.space-x-16 > * + * { + margin-left: 4rem; /* 64px */ +} +.space-y-16 > * + * { + margin-top: 4rem; /* 64px */ +} +.space-x-20 > * + * { + margin-left: 5rem; /* 80px */ +} +.space-y-20 > * + * { + margin-top: 5rem; /* 80px */ +} +.space-x-24 > * + * { + margin-left: 6rem; /* 96px */ +} +.space-y-24 > * + * { + margin-top: 6rem; /* 96px */ +} +.space-x-28 > * + * { + margin-left: 7rem; /* 112px */ +} +.space-y-28 > * + * { + margin-top: 7rem; /* 112px */ +} +.space-x-32 > * + * { + margin-left: 8rem; /* 128px */ +} +.space-y-32 > * + * { + margin-top: 8rem; /* 128px */ +} +.space-x-36 > * + * { + margin-left: 9rem; /* 144px */ +} +.space-y-36 > * + * { + margin-top: 9rem; /* 144px */ +} +.space-x-40 > * + * { + margin-left: 10rem; /* 160px */ +} +.space-y-40 > * + * { + margin-top: 10rem; /* 160px */ +} +.space-x-44 > * + * { + margin-left: 11rem; /* 176px */ +} +.space-y-44 > * + * { + margin-top: 11rem; /* 176px */ +} +.space-x-48 > * + * { + margin-left: 12rem; /* 192px */ +} +.space-y-48 > * + * { + margin-top: 12rem; /* 192px */ +} +.space-x-52 > * + * { + margin-left: 13rem; /* 208px */ +} +.space-y-52 > * + * { + margin-top: 13rem; /* 208px */ +} +.space-x-56 > * + * { + margin-left: 14rem; /* 224px */ +} +.space-y-56 > * + * { + margin-top: 14rem; /* 224px */ +} +.space-x-60 > * + * { + margin-left: 15rem; /* 240px */ +} +.space-y-60 > * + * { + margin-top: 15rem; /* 240px */ +} +.space-x-64 > * + * { + margin-left: 16rem; /* 256px */ +} +.space-y-64 > * + * { + margin-top: 16rem; /* 256px */ +} +.space-x-72 > * + * { + margin-left: 18rem; /* 288px */ +} +.space-y-72 > * + * { + margin-top: 18rem; /* 288px */ +} +.space-x-80 > * + * { + margin-left: 20rem; /* 320px */ +} +.space-y-80 > * + * { + margin-top: 20rem; /* 320px */ +} +.space-x-96 > * + * { + margin-left: 24rem; /* 384px */ +} +.space-y-96 > * + * { + margin-top: 24rem; /* 384px */ +} +.space-x-px > * + * { + margin-left: 1px; +} +.space-y-px > * + * { + margin-top: 1px; +} +.space-y-reverse > * + * { + --tw-space-y-reverse: 1; +} +.space-x-reverse > * + * { + --tw-space-x-reverse: 1; +} diff --git a/crates/dwind/resources/css/transforms.css b/crates/dwind/resources/css/transforms.css index 0cc9170..dbe4bba 100644 --- a/crates/dwind/resources/css/transforms.css +++ b/crates/dwind/resources/css/transforms.css @@ -37,6 +37,101 @@ transform: rotate(180deg); } +/* + Scale +*/ + +.scale-0 { + transform: scale(0); +} +.scale-x-0 { + transform: scaleX(0); +} +.scale-y-0 { + transform: scaleY(0); +} +.scale-50 { + transform: scale(0.5); +} +.scale-x-50 { + transform: scaleX(0.5); +} +.scale-y-50 { + transform: scaleY(0.5); +} +.scale-75 { + transform: scale(0.75); +} +.scale-x-75 { + transform: scaleX(0.75); +} +.scale-y-75 { + transform: scaleY(0.75); +} +.scale-90 { + transform: scale(0.9); +} +.scale-x-90 { + transform: scaleX(0.9); +} +.scale-y-90 { + transform: scaleY(0.9); +} +.scale-95 { + transform: scale(0.95); +} +.scale-x-95 { + transform: scaleX(0.95); +} +.scale-y-95 { + transform: scaleY(0.95); +} +.scale-100 { + transform: scale(1); +} +.scale-x-100 { + transform: scaleX(1); +} +.scale-y-100 { + transform: scaleY(1); +} +.scale-105 { + transform: scale(1.05); +} +.scale-x-105 { + transform: scaleX(1.05); +} +.scale-y-105 { + transform: scaleY(1.05); +} +.scale-110 { + transform: scale(1.1); +} +.scale-x-110 { + transform: scaleX(1.1); +} +.scale-y-110 { + transform: scaleY(1.1); +} +.scale-125 { + transform: scale(1.25); +} +.scale-x-125 { + transform: scaleX(1.25); +} +.scale-y-125 { + transform: scaleY(1.25); +} +.scale-150 { + transform: scale(1.5); +} +.scale-x-150 { + transform: scaleX(1.5); +} +.scale-y-150 { + transform: scaleY(1.5); +} + /* Skews */ @@ -87,4 +182,344 @@ .skew-y-12 { transform: skewY(12deg); -} \ No newline at end of file +} + +/* + Translate + */ + +.translate-x-0 { + transform: translateX(0px); +} + +.translate-y-0 { + transform: translateY(0px); +} + +.translate-x-px { + transform: translateX(1px); +} + +.translate-y-px { + transform: translateY(1px); +} + +.translate-x-0-5 { + transform: translateX(0.125rem); +} + +.translate-y-0-5 { + transform: translateY(0.125rem); +} + +.translate-x-1 { + transform: translateX(0.25rem); +} + +.translate-y-1 { + transform: translateY(0.25rem); +} + +.translate-x-1-5 { + transform: translateX(0.375rem); +} + +.translate-y-1-5 { + transform: translateY(0.375rem); +} + +.translate-x-2 { + transform: translateX(0.5rem); +} + +.translate-y-2 { + transform: translateY(0.5rem); +} + +.translate-x-2-5 { + transform: translateX(0.625rem); +} + +.translate-y-2-5 { + transform: translateY(0.625rem); +} + +.translate-x-3 { + transform: translateX(0.75rem); +} + +.translate-y-3 { + transform: translateY(0.75rem); +} + +.translate-x-3-5 { + transform: translateX(0.875rem); +} + +.translate-y-3-5 { + transform: translateY(0.875rem); +} + +.translate-x-4 { + transform: translateX(1rem); +} + +.translate-y-4 { + transform: translateY(1rem); +} + +.translate-x-5 { + transform: translateX(1.25rem); +} + +.translate-y-5 { + transform: translateY(1.25rem); +} + +.translate-x-6 { + transform: translateX(1.5rem); +} + +.translate-y-6 { + transform: translateY(1.5rem); +} + +.translate-x-7 { + transform: translateX(1.75rem); +} + +.translate-y-7 { + transform: translateY(1.75rem); +} + +.translate-x-8 { + transform: translateX(2rem); +} + +.translate-y-8 { + transform: translateY(2rem); +} + +.translate-x-9 { + transform: translateX(2.25rem); +} + +.translate-y-9 { + transform: translateY(2.25rem); +} + +.translate-x-10 { + transform: translateX(2.5rem); +} + +.translate-y-10 { + transform: translateY(2.5rem); +} + +.translate-x-11 { + transform: translateX(2.75rem); +} + +.translate-y-11 { + transform: translateY(2.75rem); +} + +.translate-x-12 { + transform: translateX(3rem); +} + +.translate-y-12 { + transform: translateY(3rem); +} + +.translate-x-14 { + transform: translateX(3.5rem); +} + +.translate-y-14 { + transform: translateY(3.5rem); +} + +.translate-x-16 { + transform: translateX(4rem); +} + +.translate-y-16 { + transform: translateY(4rem); +} + +.translate-x-20 { + transform: translateX(5rem); +} + +.translate-y-20 { + transform: translateY(5rem); +} + +.translate-x-24 { + transform: translateX(6rem); +} + +.translate-y-24 { + transform: translateY(6rem); +} + +.translate-x-28 { + transform: translateX(7rem); +} + +.translate-y-28 { + transform: translateY(7rem); +} + +.translate-x-32 { + transform: translateX(8rem); +} + +.translate-y-32 { + transform: translateY(8rem); +} + +.translate-x-36 { + transform: translateX(9rem); +} + +.translate-y-36 { + transform: translateY(9rem); +} + +.translate-x-40 { + transform: translateX(10rem); +} + +.translate-y-40 { + transform: translateY(10rem); +} + +.translate-x-44 { + transform: translateX(11rem); +} + +.translate-y-44 { + transform: translateY(11rem); +} + +.translate-x-48 { + transform: translateX(12rem); +} + +.translate-y-48 { + transform: translateY(12rem); +} + +.translate-x-52 { + transform: translateX(13rem); +} + +.translate-y-52 { + transform: translateY(13rem); +} + +.translate-x-56 { + transform: translateX(14rem); +} + +.translate-y-56 { + transform: translateY(14rem); +} + +.translate-x-60 { + transform: translateX(15rem); +} + +.translate-y-60 { + transform: translateY(15rem); +} + +.translate-x-64 { + transform: translateX(16rem); +} + +.translate-y-64 { + transform: translateY(16rem); +} + +.translate-x-72 { + transform: translateX(18rem); +} + +.translate-y-72 { + transform: translateY(18rem); +} + +.translate-x-80 { + transform: translateX(20rem); +} + +.translate-y-80 { + transform: translateY(20rem); +} + +.translate-x-96 { + transform: translateX(24rem); +} + +.translate-y-96 { + transform: translateY(24rem); +} + +.translate-x-1\/2 { + transform: translateX(50%); +} + +.translate-x-1\/3 { + transform: translateX(33.333333%); +} + +.translate-x-2\/3 { + transform: translateX(66.666667%); +} + +.translate-x-1\/4 { + transform: translateX(25%); +} + +.translate-x-2\/4 { + transform: translateX(50%); +} + +.translate-x-3\/4 { + transform: translateX(75%); +} + +.translate-x-full { + transform: translateX(100%); +} + +.translate-y-1\/2 { + transform: translateY(50%); +} + +.translate-y-1\/3 { + transform: translateY(33.333333%); +} + +.translate-y-2\/3 { + transform: translateY(66.666667%); +} + +.translate-y-1\/4 { + transform: translateY(25%); +} + +.translate-y-2\/4 { + transform: translateY(50%); +} + +.translate-y-3\/4 { + transform: translateY(75%); +} + +.translate-y-full { + transform: translateY(100%); +} diff --git a/crates/dwind/resources/css/typography.css b/crates/dwind/resources/css/typography.css index d30a15f..2847911 100644 --- a/crates/dwind/resources/css/typography.css +++ b/crates/dwind/resources/css/typography.css @@ -140,4 +140,62 @@ .text-9xl { font-size: 8rem; /* 128px */ line-height: 1; +} + +/* Line Height utilities */ +.leading-3 { line-height: .75rem; /* 12px */ } +.leading-4 { line-height: 1rem; /* 16px */ } +.leading-5 { line-height: 1.25rem; /* 20px */ } +.leading-6 { line-height: 1.5rem; /* 24px */ } +.leading-7 { line-height: 1.75rem; /* 28px */ } +.leading-8 { line-height: 2rem; /* 32px */ } +.leading-9 { line-height: 2.25rem; /* 36px */ } +.leading-10 { line-height: 2.5rem; /* 40px */ } +.leading-none { line-height: 1; } +.leading-tight { line-height: 1.25; } +.leading-snug { line-height: 1.375; } +.leading-normal { line-height: 1.5; } +.leading-relaxed { line-height: 1.625; } +.leading-loose { line-height: 2; } + +/* Text color utilities */ +.text-inherit { + color: inherit; +} + +.text-current { + color: currentColor; +} + +.text-transparent { + color: transparent; +} + +.text-black { + color: rgb(0 0 0); +} + +.text-white { + color: rgb(255 255 255); +} + +/* Background color utilities */ +.bg-inherit { + background-color: inherit; +} + +.bg-current { + background-color: currentColor; +} + +.bg-transparent { + background-color: transparent; +} + +.bg-black { + background-color: rgb(0 0 0); +} + +.bg-white { + background-color: rgb(255 255 255); } \ No newline at end of file diff --git a/crates/dwind/src/lib.rs b/crates/dwind/src/lib.rs index bf0de6f..be87295 100644 --- a/crates/dwind/src/lib.rs +++ b/crates/dwind/src/lib.rs @@ -1,6 +1,7 @@ mod modules; pub mod prelude { + pub use super::animations::*; pub use super::base::*; pub use super::borders::*; pub use super::box_shadow::*; @@ -46,7 +47,6 @@ pub mod effects { include!(concat!(env!("OUT_DIR"), "/effects.rs")); } -use dominator::stylesheet; pub use modules::borders; pub mod interactivity { @@ -77,6 +77,7 @@ pub mod typography { include!(concat!(env!("OUT_DIR"), "/typography.rs")); } +pub use modules::animations; pub use modules::backgrounds; pub use modules::colors; pub use modules::layout; diff --git a/crates/dwind/src/modules/animations.rs b/crates/dwind/src/modules/animations.rs new file mode 100644 index 0000000..091273c --- /dev/null +++ b/crates/dwind/src/modules/animations.rs @@ -0,0 +1 @@ +include!(concat!(env!("OUT_DIR"), "/animations.rs")); \ No newline at end of file diff --git a/crates/dwind/src/modules/colors.rs b/crates/dwind/src/modules/colors.rs index 566c3c0..2fb941e 100644 --- a/crates/dwind/src/modules/colors.rs +++ b/crates/dwind/src/modules/colors.rs @@ -56,5 +56,12 @@ macro_rules! stroke_generator { }; } +#[macro_export] +macro_rules! ring_generator { + ($color:tt) => { + const_format::formatcp!("--dw-ring-color: {};", $color) + }; +} + include!(concat!(env!("OUT_DIR"), "/colors_generated.rs")); include!(concat!(env!("OUT_DIR"), "/colors.rs")); diff --git a/crates/dwind/src/modules/layout.rs b/crates/dwind/src/modules/layout.rs index e5dc2a5..33f5112 100644 --- a/crates/dwind/src/modules/layout.rs +++ b/crates/dwind/src/modules/layout.rs @@ -1,3 +1,5 @@ +use dwind_macros::dwgenerate_map; + #[macro_export] macro_rules! aspect_generator { ($color:tt) => { @@ -5,4 +7,505 @@ macro_rules! aspect_generator { }; } +#[macro_export] +macro_rules! inset_generator { + ($value:tt) => { + const_format::formatcp!("inset: {};", $value) + }; +} + +#[macro_export] +macro_rules! inset_x_generator { + ($value:tt) => { + const_format::formatcp!("left: {};right: {};", $value, $value) + }; +} + +#[macro_export] +macro_rules! inset_y_generator { + ($value:tt) => { + const_format::formatcp!("top: {};bottom: {};", $value, $value) + }; +} + +#[macro_export] +macro_rules! inset_inline_start_generator { + ($value:tt) => { + const_format::formatcp!("inset-inline-start: {};", $value) + }; +} + +#[macro_export] +macro_rules! inset_inline_end_generator { + ($value:tt) => { + const_format::formatcp!("inset-inline-end: {};", $value) + }; +} + +#[macro_export] +macro_rules! position_generator { + ($prop:tt, $value:tt) => { + const_format::formatcp!("{}: {};", $prop, $value) + }; +} + include!(concat!(env!("OUT_DIR"), "/layout.rs")); + +// Inset all sides +dwgenerate_map!( + "inset", + "inset-", + [ + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem"), + ("auto", "auto"), + ("1/2", "50%"), + ("1/3", "33.333333%"), + ("2/3", "66.666667%"), + ("1/4", "25%"), + ("2/4", "50%"), + ("3/4", "75%"), + ("full", "100%") + ] +); + +// Inset X (left/right) +dwgenerate_map!( + "inset-x", + "inset-x-", + [ + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem"), + ("auto", "auto"), + ("1/2", "50%"), + ("1/3", "33.333333%"), + ("2/3", "66.666667%"), + ("1/4", "25%"), + ("2/4", "50%"), + ("3/4", "75%"), + ("full", "100%") + ] +); + +// Inset Y (top/bottom) +dwgenerate_map!( + "inset-y", + "inset-y-", + [ + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem"), + ("auto", "auto"), + ("1/2", "50%"), + ("1/3", "33.333333%"), + ("2/3", "66.666667%"), + ("1/4", "25%"), + ("2/4", "50%"), + ("3/4", "75%"), + ("full", "100%") + ] +); + +// Start (inset-inline-start) +dwgenerate_map!( + "start", + "inset-inline-start-", + [ + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem"), + ("auto", "auto"), + ("1/2", "50%"), + ("1/3", "33.333333%"), + ("2/3", "66.666667%"), + ("1/4", "25%"), + ("2/4", "50%"), + ("3/4", "75%"), + ("full", "100%") + ] +); + +// End (inset-inline-end) +dwgenerate_map!( + "end", + "inset-inline-end-", + [ + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem"), + ("auto", "auto"), + ("1/2", "50%"), + ("1/3", "33.333333%"), + ("2/3", "66.666667%"), + ("1/4", "25%"), + ("2/4", "50%"), + ("3/4", "75%"), + ("full", "100%") + ] +); + +// Top +dwgenerate_map!( + "top", + "position-", + [ + ("0", "top,0px"), + ("px", "top,1px"), + ("0.5", "top,0.125rem"), + ("1", "top,0.25rem"), + ("1.5", "top,0.375rem"), + ("2", "top,0.5rem"), + ("2.5", "top,0.625rem"), + ("3", "top,0.75rem"), + ("3.5", "top,0.875rem"), + ("4", "top,1rem"), + ("5", "top,1.25rem"), + ("6", "top,1.5rem"), + ("7", "top,1.75rem"), + ("8", "top,2rem"), + ("9", "top,2.25rem"), + ("10", "top,2.5rem"), + ("11", "top,2.75rem"), + ("12", "top,3rem"), + ("14", "top,3.5rem"), + ("16", "top,4rem"), + ("20", "top,5rem"), + ("24", "top,6rem"), + ("28", "top,7rem"), + ("32", "top,8rem"), + ("36", "top,9rem"), + ("40", "top,10rem"), + ("44", "top,11rem"), + ("48", "top,12rem"), + ("52", "top,13rem"), + ("56", "top,14rem"), + ("60", "top,15rem"), + ("64", "top,16rem"), + ("72", "top,18rem"), + ("80", "top,20rem"), + ("96", "top,24rem"), + ("auto", "top,auto"), + ("1/2", "top,50%"), + ("1/3", "top,33.333333%"), + ("2/3", "top,66.666667%"), + ("1/4", "top,25%"), + ("2/4", "top,50%"), + ("3/4", "top,75%"), + ("full", "top,100%") + ] +); + +// Right +dwgenerate_map!( + "right", + "position-", + [ + ("0", "right,0px"), + ("px", "right,1px"), + ("0.5", "right,0.125rem"), + ("1", "right,0.25rem"), + ("1.5", "right,0.375rem"), + ("2", "right,0.5rem"), + ("2.5", "right,0.625rem"), + ("3", "right,0.75rem"), + ("3.5", "right,0.875rem"), + ("4", "right,1rem"), + ("5", "right,1.25rem"), + ("6", "right,1.5rem"), + ("7", "right,1.75rem"), + ("8", "right,2rem"), + ("9", "right,2.25rem"), + ("10", "right,2.5rem"), + ("11", "right,2.75rem"), + ("12", "right,3rem"), + ("14", "right,3.5rem"), + ("16", "right,4rem"), + ("20", "right,5rem"), + ("24", "right,6rem"), + ("28", "right,7rem"), + ("32", "right,8rem"), + ("36", "right,9rem"), + ("40", "right,10rem"), + ("44", "right,11rem"), + ("48", "right,12rem"), + ("52", "right,13rem"), + ("56", "right,14rem"), + ("60", "right,15rem"), + ("64", "right,16rem"), + ("72", "right,18rem"), + ("80", "right,20rem"), + ("96", "right,24rem"), + ("auto", "right,auto"), + ("1/2", "right,50%"), + ("1/3", "right,33.333333%"), + ("2/3", "right,66.666667%"), + ("1/4", "right,25%"), + ("2/4", "right,50%"), + ("3/4", "right,75%"), + ("full", "right,100%") + ] +); + +// Bottom +dwgenerate_map!( + "bottom", + "position-", + [ + ("0", "bottom,0px"), + ("px", "bottom,1px"), + ("0.5", "bottom,0.125rem"), + ("1", "bottom,0.25rem"), + ("1.5", "bottom,0.375rem"), + ("2", "bottom,0.5rem"), + ("2.5", "bottom,0.625rem"), + ("3", "bottom,0.75rem"), + ("3.5", "bottom,0.875rem"), + ("4", "bottom,1rem"), + ("5", "bottom,1.25rem"), + ("6", "bottom,1.5rem"), + ("7", "bottom,1.75rem"), + ("8", "bottom,2rem"), + ("9", "bottom,2.25rem"), + ("10", "bottom,2.5rem"), + ("11", "bottom,2.75rem"), + ("12", "bottom,3rem"), + ("14", "bottom,3.5rem"), + ("16", "bottom,4rem"), + ("20", "bottom,5rem"), + ("24", "bottom,6rem"), + ("28", "bottom,7rem"), + ("32", "bottom,8rem"), + ("36", "bottom,9rem"), + ("40", "bottom,10rem"), + ("44", "bottom,11rem"), + ("48", "bottom,12rem"), + ("52", "bottom,13rem"), + ("56", "bottom,14rem"), + ("60", "bottom,15rem"), + ("64", "bottom,16rem"), + ("72", "bottom,18rem"), + ("80", "bottom,20rem"), + ("96", "bottom,24rem"), + ("auto", "bottom,auto"), + ("1/2", "bottom,50%"), + ("1/3", "bottom,33.333333%"), + ("2/3", "bottom,66.666667%"), + ("1/4", "bottom,25%"), + ("2/4", "bottom,50%"), + ("3/4", "bottom,75%"), + ("full", "bottom,100%") + ] +); + +// Left +dwgenerate_map!( + "left", + "position-", + [ + ("0", "left,0px"), + ("px", "left,1px"), + ("0.5", "left,0.125rem"), + ("1", "left,0.25rem"), + ("1.5", "left,0.375rem"), + ("2", "left,0.5rem"), + ("2.5", "left,0.625rem"), + ("3", "left,0.75rem"), + ("3.5", "left,0.875rem"), + ("4", "left,1rem"), + ("5", "left,1.25rem"), + ("6", "left,1.5rem"), + ("7", "left,1.75rem"), + ("8", "left,2rem"), + ("9", "left,2.25rem"), + ("10", "left,2.5rem"), + ("11", "left,2.75rem"), + ("12", "left,3rem"), + ("14", "left,3.5rem"), + ("16", "left,4rem"), + ("20", "left,5rem"), + ("24", "left,6rem"), + ("28", "left,7rem"), + ("32", "left,8rem"), + ("36", "left,9rem"), + ("40", "left,10rem"), + ("44", "left,11rem"), + ("48", "left,12rem"), + ("52", "left,13rem"), + ("56", "left,14rem"), + ("60", "left,15rem"), + ("64", "left,16rem"), + ("72", "left,18rem"), + ("80", "left,20rem"), + ("96", "left,24rem"), + ("auto", "left,auto"), + ("1/2", "left,50%"), + ("1/3", "left,33.333333%"), + ("2/3", "left,66.666667%"), + ("1/4", "left,25%"), + ("2/4", "left,50%"), + ("3/4", "left,75%"), + ("full", "left,100%") + ] +); diff --git a/crates/dwind/src/modules/mod.rs b/crates/dwind/src/modules/mod.rs index 3e6b84d..a976ee2 100644 --- a/crates/dwind/src/modules/mod.rs +++ b/crates/dwind/src/modules/mod.rs @@ -1,3 +1,4 @@ +pub mod animations; pub mod backgrounds; pub mod borders; pub mod colors; diff --git a/crates/dwind/src/modules/spacing.rs b/crates/dwind/src/modules/spacing.rs index 617633d..094f731 100644 --- a/crates/dwind/src/modules/spacing.rs +++ b/crates/dwind/src/modules/spacing.rs @@ -30,6 +30,20 @@ macro_rules! margin_generator { }; } +#[macro_export] +macro_rules! margin_inline_start_generator { + ($margin:tt) => { + const_format::formatcp!("margin-inline-start: {};", $margin) + }; +} + +#[macro_export] +macro_rules! margin_inline_end_generator { + ($margin:tt) => { + const_format::formatcp!("margin-inline-end: {};", $margin) + }; +} + #[macro_export] macro_rules! padding_dir_generator { ($dir:tt, $padding:tt) => { @@ -58,6 +72,20 @@ macro_rules! padding_generator { }; } +#[macro_export] +macro_rules! padding_inline_start_generator { + ($padding:tt) => { + const_format::formatcp!("padding-inline-start: {};", $padding) + }; +} + +#[macro_export] +macro_rules! padding_inline_end_generator { + ($padding:tt) => { + const_format::formatcp!("padding-inline-end: {};", $padding) + }; +} + #[macro_export] macro_rules! gap_generator { ($gap:tt) => { @@ -69,27 +97,46 @@ dwgenerate_map!( "m", "margin-", [ - ("0", "0"), - ("1", "4px"), - ("2", "8px"), - ("3", "12px"), - ("4", "16px"), - ("5", "20px"), - ("6", "24px"), - ("7", "28px"), - ("8", "32px"), - ("9", "36px"), - ("10", "40px"), - ("11", "44px"), - ("12", "48px"), - ("13", "52px"), - ("14", "56px"), - ("15", "60px"), - ("16", "64px"), - ("17", "68px"), - ("18", "72px"), - ("19", "76px"), - ("20", "80px") + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("13", "3.25rem"), + ("14", "3.5rem"), + ("15", "3.75rem"), + ("16", "4rem"), + ("17", "4.25rem"), + ("18", "4.5rem"), + ("19", "4.75rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem") ] ); @@ -98,89 +145,89 @@ dwgenerate_map!( "margin-dir-", [ ("l-0", "left,0"), - ("l-1", "left,4px"), - ("l-2", "left,8px"), - ("l-3", "left,12px"), - ("l-4", "left,16px"), - ("l-5", "left,20px"), - ("l-6", "left,24px"), - ("l-7", "left,28px"), - ("l-8", "left,32px"), - ("l-9", "left,36px"), - ("l-10", "left,40px"), - ("l-11", "left,44px"), - ("l-12", "left,48px"), - ("l-13", "left,52px"), - ("l-14", "left,56px"), - ("l-15", "left,60px"), - ("l-16", "left,64px"), - ("l-17", "left,68px"), - ("l-18", "left,72px"), - ("l-19", "left,76px"), - ("l-20", "left,80px"), + ("l-1", "left,0.25rem"), + ("l-2", "left,0.5rem"), + ("l-3", "left,0.75rem"), + ("l-4", "left,1rem"), + ("l-5", "left,1.25rem"), + ("l-6", "left,1.5rem"), + ("l-7", "left,1.75rem"), + ("l-8", "left,2rem"), + ("l-9", "left,2.25rem"), + ("l-10", "left,2.5rem"), + ("l-11", "left,2.75rem"), + ("l-12", "left,3rem"), + ("l-13", "left,3.25rem"), + ("l-14", "left,3.5rem"), + ("l-15", "left,3.75rem"), + ("l-16", "left,4rem"), + ("l-17", "left,4.25rem"), + ("l-18", "left,4.5rem"), + ("l-19", "left,4.75rem"), + ("l-20", "left,5rem"), ("r-0", "right,0"), - ("r-1", "right,4px"), - ("r-2", "right,8px"), - ("r-3", "right,12px"), - ("r-4", "right,16px"), - ("r-5", "right,20px"), - ("r-6", "right,24px"), - ("r-7", "right,28px"), - ("r-8", "right,32px"), - ("r-9", "right,36px"), - ("r-10", "right,40px"), - ("r-11", "right,44px"), - ("r-12", "right,48px"), - ("r-13", "right,52px"), - ("r-14", "right,56px"), - ("r-15", "right,60px"), - ("r-16", "right,64px"), - ("r-17", "right,68px"), - ("r-18", "right,72px"), - ("r-19", "right,76px"), - ("r-20", "right,80px"), + ("r-1", "right,0.25rem"), + ("r-2", "right,0.5rem"), + ("r-3", "right,0.75rem"), + ("r-4", "right,1rem"), + ("r-5", "right,1.25rem"), + ("r-6", "right,1.5rem"), + ("r-7", "right,1.75rem"), + ("r-8", "right,2rem"), + ("r-9", "right,2.25rem"), + ("r-10", "right,2.5rem"), + ("r-11", "right,2.75rem"), + ("r-12", "right,3rem"), + ("r-13", "right,3.25rem"), + ("r-14", "right,3.5rem"), + ("r-15", "right,3.75rem"), + ("r-16", "right,4rem"), + ("r-17", "right,4.25rem"), + ("r-18", "right,4.5rem"), + ("r-19", "right,4.75rem"), + ("r-20", "right,5rem"), ("t-0", "top,0"), - ("t-1", "top,4px"), - ("t-2", "top,8px"), - ("t-3", "top,12px"), - ("t-4", "top,16px"), - ("t-5", "top,20px"), - ("t-6", "top,24px"), - ("t-7", "top,28px"), - ("t-8", "top,32px"), - ("t-9", "top,36px"), - ("t-10", "top,40px"), - ("t-11", "top,44px"), - ("t-12", "top,48px"), - ("t-13", "top,52px"), - ("t-14", "top,56px"), - ("t-15", "top,60px"), - ("t-16", "top,64px"), - ("t-17", "top,68px"), - ("t-18", "top,72px"), - ("t-19", "top,76px"), - ("t-20", "top,80px"), + ("t-1", "top,0.25rem"), + ("t-2", "top,0.5rem"), + ("t-3", "top,0.75rem"), + ("t-4", "top,1rem"), + ("t-5", "top,1.25rem"), + ("t-6", "top,1.5rem"), + ("t-7", "top,1.75rem"), + ("t-8", "top,2rem"), + ("t-9", "top,2.25rem"), + ("t-10", "top,2.5rem"), + ("t-11", "top,2.75rem"), + ("t-12", "top,3rem"), + ("t-13", "top,3.25rem"), + ("t-14", "top,3.5rem"), + ("t-15", "top,3.75rem"), + ("t-16", "top,4rem"), + ("t-17", "top,4.25rem"), + ("t-18", "top,4.5rem"), + ("t-19", "top,4.75rem"), + ("t-20", "top,5rem"), ("b-0", "bottom,0"), - ("b-1", "bottom,4px"), - ("b-2", "bottom,8px"), - ("b-3", "bottom,12px"), - ("b-4", "bottom,16px"), - ("b-5", "bottom,20px"), - ("b-6", "bottom,24px"), - ("b-7", "bottom,28px"), - ("b-8", "bottom,32px"), - ("b-9", "bottom,36px"), - ("b-10", "bottom,40px"), - ("b-11", "bottom,44px"), - ("b-12", "bottom,48px"), - ("b-13", "bottom,52px"), - ("b-14", "bottom,56px"), - ("b-15", "bottom,60px"), - ("b-16", "bottom,64px"), - ("b-17", "bottom,68px"), - ("b-18", "bottom,72px"), - ("b-19", "bottom,76px"), - ("b-20", "bottom,80px") + ("b-1", "bottom,0.25rem"), + ("b-2", "bottom,0.5rem"), + ("b-3", "bottom,0.75rem"), + ("b-4", "bottom,1rem"), + ("b-5", "bottom,1.25rem"), + ("b-6", "bottom,1.5rem"), + ("b-7", "bottom,1.75rem"), + ("b-8", "bottom,2rem"), + ("b-9", "bottom,2.25rem"), + ("b-10", "bottom,2.5rem"), + ("b-11", "bottom,2.75rem"), + ("b-12", "bottom,3rem"), + ("b-13", "bottom,3.25rem"), + ("b-14", "bottom,3.5rem"), + ("b-15", "bottom,3.75rem"), + ("b-16", "bottom,4rem"), + ("b-17", "bottom,4.25rem"), + ("b-18", "bottom,4.5rem"), + ("b-19", "bottom,4.75rem"), + ("b-20", "bottom,5rem") ] ); @@ -189,26 +236,26 @@ dwgenerate_map!( "margin-x-", [ ("x-0", "0"), - ("x-1", "4px"), - ("x-2", "8px"), - ("x-3", "12px"), - ("x-4", "16px"), - ("x-5", "20px"), - ("x-6", "24px"), - ("x-7", "28px"), - ("x-8", "32px"), - ("x-9", "36px"), - ("x-10", "40px"), - ("x-11", "44px"), - ("x-12", "48px"), - ("x-13", "52px"), - ("x-14", "56px"), - ("x-15", "60px"), - ("x-16", "64px"), - ("x-17", "68px"), - ("x-18", "72px"), - ("x-19", "76px"), - ("x-20", "80px"), + ("x-1", "0.25rem"), + ("x-2", "0.5rem"), + ("x-3", "0.75rem"), + ("x-4", "1rem"), + ("x-5", "1.25rem"), + ("x-6", "1.5rem"), + ("x-7", "1.75rem"), + ("x-8", "2rem"), + ("x-9", "2.25rem"), + ("x-10", "2.5rem"), + ("x-11", "2.75rem"), + ("x-12", "3rem"), + ("x-13", "3.25rem"), + ("x-14", "3.5rem"), + ("x-15", "3.75rem"), + ("x-16", "4rem"), + ("x-17", "4.25rem"), + ("x-18", "4.5rem"), + ("x-19", "4.75rem"), + ("x-20", "5rem"), ] ); @@ -216,27 +263,46 @@ dwgenerate_map!( "p", "padding-", [ - ("0", "0"), - ("1", "4px"), - ("2", "8px"), - ("3", "12px"), - ("4", "16px"), - ("5", "20px"), - ("6", "24px"), - ("7", "28px"), - ("8", "32px"), - ("9", "36px"), - ("10", "40px"), - ("11", "44px"), - ("12", "48px"), - ("13", "52px"), - ("14", "56px"), - ("15", "60px"), - ("16", "64px"), - ("17", "68px"), - ("18", "72px"), - ("19", "76px"), - ("20", "80px"), + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("13", "3.25rem"), + ("14", "3.5rem"), + ("15", "3.75rem"), + ("16", "4rem"), + ("17", "4.25rem"), + ("18", "4.5rem"), + ("19", "4.75rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem") ] ); @@ -245,89 +311,89 @@ dwgenerate_map!( "padding-dir-", [ ("l-0", "left,0"), - ("l-1", "left,4px"), - ("l-2", "left,8px"), - ("l-3", "left,12px"), - ("l-4", "left,16px"), - ("l-5", "left,20px"), - ("l-6", "left,24px"), - ("l-7", "left,28px"), - ("l-8", "left,32px"), - ("l-9", "left,36px"), - ("l-10", "left,40px"), - ("l-11", "left,44px"), - ("l-12", "left,48px"), - ("l-13", "left,52px"), - ("l-14", "left,56px"), - ("l-15", "left,60px"), - ("l-16", "left,64px"), - ("l-17", "left,68px"), - ("l-18", "left,72px"), - ("l-19", "left,76px"), - ("l-20", "left,80px"), + ("l-1", "left,0.25rem"), + ("l-2", "left,0.5rem"), + ("l-3", "left,0.75rem"), + ("l-4", "left,1rem"), + ("l-5", "left,1.25rem"), + ("l-6", "left,1.5rem"), + ("l-7", "left,1.75rem"), + ("l-8", "left,2rem"), + ("l-9", "left,2.25rem"), + ("l-10", "left,2.5rem"), + ("l-11", "left,2.75rem"), + ("l-12", "left,3rem"), + ("l-13", "left,3.25rem"), + ("l-14", "left,3.5rem"), + ("l-15", "left,3.75rem"), + ("l-16", "left,4rem"), + ("l-17", "left,4.25rem"), + ("l-18", "left,4.5rem"), + ("l-19", "left,4.75rem"), + ("l-20", "left,5rem"), ("r-0", "right,0"), - ("r-1", "right,4px"), - ("r-2", "right,8px"), - ("r-3", "right,12px"), - ("r-4", "right,16px"), - ("r-5", "right,20px"), - ("r-6", "right,24px"), - ("r-7", "right,28px"), - ("r-8", "right,32px"), - ("r-9", "right,36px"), - ("r-10", "right,40px"), - ("r-11", "right,44px"), - ("r-12", "right,48px"), - ("r-13", "right,52px"), - ("r-14", "right,56px"), - ("r-15", "right,60px"), - ("r-16", "right,64px"), - ("r-17", "right,68px"), - ("r-18", "right,72px"), - ("r-19", "right,76px"), - ("r-20", "right,80px"), + ("r-1", "right,0.25rem"), + ("r-2", "right,0.5rem"), + ("r-3", "right,0.75rem"), + ("r-4", "right,1rem"), + ("r-5", "right,1.25rem"), + ("r-6", "right,1.5rem"), + ("r-7", "right,1.75rem"), + ("r-8", "right,2rem"), + ("r-9", "right,2.25rem"), + ("r-10", "right,2.5rem"), + ("r-11", "right,2.75rem"), + ("r-12", "right,3rem"), + ("r-13", "right,3.25rem"), + ("r-14", "right,3.5rem"), + ("r-15", "right,3.75rem"), + ("r-16", "right,4rem"), + ("r-17", "right,4.25rem"), + ("r-18", "right,4.5rem"), + ("r-19", "right,4.75rem"), + ("r-20", "right,5rem"), ("t-0", "top,0"), - ("t-1", "top,4px"), - ("t-2", "top,8px"), - ("t-3", "top,12px"), - ("t-4", "top,16px"), - ("t-5", "top,20px"), - ("t-6", "top,24px"), - ("t-7", "top,28px"), - ("t-8", "top,32px"), - ("t-9", "top,36px"), - ("t-10", "top,40px"), - ("t-11", "top,44px"), - ("t-12", "top,48px"), - ("t-13", "top,52px"), - ("t-14", "top,56px"), - ("t-15", "top,60px"), - ("t-16", "top,64px"), - ("t-17", "top,68px"), - ("t-18", "top,72px"), - ("t-19", "top,76px"), - ("t-20", "top,80px"), + ("t-1", "top,0.25rem"), + ("t-2", "top,0.5rem"), + ("t-3", "top,0.75rem"), + ("t-4", "top,1rem"), + ("t-5", "top,1.25rem"), + ("t-6", "top,1.5rem"), + ("t-7", "top,1.75rem"), + ("t-8", "top,2rem"), + ("t-9", "top,2.25rem"), + ("t-10", "top,2.5rem"), + ("t-11", "top,2.75rem"), + ("t-12", "top,3rem"), + ("t-13", "top,3.25rem"), + ("t-14", "top,3.5rem"), + ("t-15", "top,3.75rem"), + ("t-16", "top,4rem"), + ("t-17", "top,4.25rem"), + ("t-18", "top,4.5rem"), + ("t-19", "top,4.75rem"), + ("t-20", "top,5rem"), ("b-0", "bottom,0"), - ("b-1", "bottom,4px"), - ("b-2", "bottom,8px"), - ("b-3", "bottom,12px"), - ("b-4", "bottom,16px"), - ("b-5", "bottom,20px"), - ("b-6", "bottom,24px"), - ("b-7", "bottom,28px"), - ("b-8", "bottom,32px"), - ("b-9", "bottom,36px"), - ("b-10", "bottom,40px"), - ("b-11", "bottom,44px"), - ("b-12", "bottom,48px"), - ("b-13", "bottom,52px"), - ("b-14", "bottom,56px"), - ("b-15", "bottom,60px"), - ("b-16", "bottom,64px"), - ("b-17", "bottom,68px"), - ("b-18", "bottom,72px"), - ("b-19", "bottom,76px"), - ("b-20", "bottom,80px"), + ("b-1", "bottom,0.25rem"), + ("b-2", "bottom,0.5rem"), + ("b-3", "bottom,0.75rem"), + ("b-4", "bottom,1rem"), + ("b-5", "bottom,1.25rem"), + ("b-6", "bottom,1.5rem"), + ("b-7", "bottom,1.75rem"), + ("b-8", "bottom,2rem"), + ("b-9", "bottom,2.25rem"), + ("b-10", "bottom,2.5rem"), + ("b-11", "bottom,2.75rem"), + ("b-12", "bottom,3rem"), + ("b-13", "bottom,3.25rem"), + ("b-14", "bottom,3.5rem"), + ("b-15", "bottom,3.75rem"), + ("b-16", "bottom,4rem"), + ("b-17", "bottom,4.25rem"), + ("b-18", "bottom,4.5rem"), + ("b-19", "bottom,4.75rem"), + ("b-20", "bottom,5rem"), ] ); @@ -336,26 +402,26 @@ dwgenerate_map!( "gap-", [ ("0", "0"), - ("1", "4px"), - ("2", "8px"), - ("3", "12px"), - ("4", "16px"), - ("5", "20px"), - ("6", "24px"), - ("7", "28px"), - ("8", "32px"), - ("9", "36px"), - ("10", "40px"), - ("11", "44px"), - ("12", "48px"), - ("13", "52px"), - ("14", "56px"), - ("15", "60px"), - ("16", "64px"), - ("17", "68px"), - ("18", "72px"), - ("19", "76px"), - ("20", "80px"), + ("1", "0.25rem"), + ("2", "0.5rem"), + ("3", "0.75rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("13", "3.25rem"), + ("14", "3.5rem"), + ("15", "3.75rem"), + ("16", "4rem"), + ("17", "4.25rem"), + ("18", "4.5rem"), + ("19", "4.75rem"), + ("20", "5rem"), ] ); @@ -364,27 +430,41 @@ dwgenerate_map!( "mt", "margin-dir-", [ - ("0", "top,0"), - ("1", "top,4px"), - ("2", "top,8px"), - ("3", "top,12px"), - ("4", "top,16px"), - ("5", "top,20px"), - ("6", "top,24px"), - ("7", "top,28px"), - ("8", "top,32px"), - ("9", "top,36px"), - ("10", "top,40px"), - ("11", "top,44px"), - ("12", "top,48px"), - ("13", "top,52px"), - ("14", "top,56px"), - ("15", "top,60px"), - ("16", "top,64px"), - ("17", "top,68px"), - ("18", "top,72px"), - ("19", "top,76px"), - ("20", "top,80px"), + ("0", "top,0px"), + ("px", "top,1px"), + ("0.5", "top,0.125rem"), + ("1", "top,0.25rem"), + ("1.5", "top,0.375rem"), + ("2", "top,0.5rem"), + ("2.5", "top,0.625rem"), + ("3", "top,0.75rem"), + ("3.5", "top,0.875rem"), + ("4", "top,1rem"), + ("5", "top,1.25rem"), + ("6", "top,1.5rem"), + ("7", "top,1.75rem"), + ("8", "top,2rem"), + ("9", "top,2.25rem"), + ("10", "top,2.5rem"), + ("11", "top,2.75rem"), + ("12", "top,3rem"), + ("14", "top,3.5rem"), + ("16", "top,4rem"), + ("20", "top,5rem"), + ("24", "top,6rem"), + ("28", "top,7rem"), + ("32", "top,8rem"), + ("36", "top,9rem"), + ("40", "top,10rem"), + ("44", "top,11rem"), + ("48", "top,12rem"), + ("52", "top,13rem"), + ("56", "top,14rem"), + ("60", "top,15rem"), + ("64", "top,16rem"), + ("72", "top,18rem"), + ("80", "top,20rem"), + ("96", "top,24rem") ] ); @@ -392,27 +472,41 @@ dwgenerate_map!( "mb", "margin-dir-", [ - ("0", "bottom,0"), - ("1", "bottom,4px"), - ("2", "bottom,8px"), - ("3", "bottom,12px"), - ("4", "bottom,16px"), - ("5", "bottom,20px"), - ("6", "bottom,24px"), - ("7", "bottom,28px"), - ("8", "bottom,32px"), - ("9", "bottom,36px"), - ("10", "bottom,40px"), - ("11", "bottom,44px"), - ("12", "bottom,48px"), - ("13", "bottom,52px"), - ("14", "bottom,56px"), - ("15", "bottom,60px"), - ("16", "bottom,64px"), - ("17", "bottom,68px"), - ("18", "bottom,72px"), - ("19", "bottom,76px"), - ("20", "bottom,80px"), + ("0", "bottom,0px"), + ("px", "bottom,1px"), + ("0.5", "bottom,0.125rem"), + ("1", "bottom,0.25rem"), + ("1.5", "bottom,0.375rem"), + ("2", "bottom,0.5rem"), + ("2.5", "bottom,0.625rem"), + ("3", "bottom,0.75rem"), + ("3.5", "bottom,0.875rem"), + ("4", "bottom,1rem"), + ("5", "bottom,1.25rem"), + ("6", "bottom,1.5rem"), + ("7", "bottom,1.75rem"), + ("8", "bottom,2rem"), + ("9", "bottom,2.25rem"), + ("10", "bottom,2.5rem"), + ("11", "bottom,2.75rem"), + ("12", "bottom,3rem"), + ("14", "bottom,3.5rem"), + ("16", "bottom,4rem"), + ("20", "bottom,5rem"), + ("24", "bottom,6rem"), + ("28", "bottom,7rem"), + ("32", "bottom,8rem"), + ("36", "bottom,9rem"), + ("40", "bottom,10rem"), + ("44", "bottom,11rem"), + ("48", "bottom,12rem"), + ("52", "bottom,13rem"), + ("56", "bottom,14rem"), + ("60", "bottom,15rem"), + ("64", "bottom,16rem"), + ("72", "bottom,18rem"), + ("80", "bottom,20rem"), + ("96", "bottom,24rem") ] ); @@ -420,27 +514,41 @@ dwgenerate_map!( "ml", "margin-dir-", [ - ("0", "left,0"), - ("1", "left,4px"), - ("2", "left,8px"), - ("3", "left,12px"), - ("4", "left,16px"), - ("5", "left,20px"), - ("6", "left,24px"), - ("7", "left,28px"), - ("8", "left,32px"), - ("9", "left,36px"), - ("10", "left,40px"), - ("11", "left,44px"), - ("12", "left,48px"), - ("13", "left,52px"), - ("14", "left,56px"), - ("15", "left,60px"), - ("16", "left,64px"), - ("17", "left,68px"), - ("18", "left,72px"), - ("19", "left,76px"), - ("20", "left,80px"), + ("0", "left,0px"), + ("px", "left,1px"), + ("0.5", "left,0.125rem"), + ("1", "left,0.25rem"), + ("1.5", "left,0.375rem"), + ("2", "left,0.5rem"), + ("2.5", "left,0.625rem"), + ("3", "left,0.75rem"), + ("3.5", "left,0.875rem"), + ("4", "left,1rem"), + ("5", "left,1.25rem"), + ("6", "left,1.5rem"), + ("7", "left,1.75rem"), + ("8", "left,2rem"), + ("9", "left,2.25rem"), + ("10", "left,2.5rem"), + ("11", "left,2.75rem"), + ("12", "left,3rem"), + ("14", "left,3.5rem"), + ("16", "left,4rem"), + ("20", "left,5rem"), + ("24", "left,6rem"), + ("28", "left,7rem"), + ("32", "left,8rem"), + ("36", "left,9rem"), + ("40", "left,10rem"), + ("44", "left,11rem"), + ("48", "left,12rem"), + ("52", "left,13rem"), + ("56", "left,14rem"), + ("60", "left,15rem"), + ("64", "left,16rem"), + ("72", "left,18rem"), + ("80", "left,20rem"), + ("96", "left,24rem") ] ); @@ -448,27 +556,127 @@ dwgenerate_map!( "mr", "margin-dir-", [ - ("0", "right,0"), - ("1", "right,4px"), - ("2", "right,8px"), - ("3", "right,12px"), - ("4", "right,16px"), - ("5", "right,20px"), - ("6", "right,24px"), - ("7", "right,28px"), - ("8", "right,32px"), - ("9", "right,36px"), - ("10", "right,40px"), - ("11", "right,44px"), - ("12", "right,48px"), - ("13", "right,52px"), - ("14", "right,56px"), - ("15", "right,60px"), - ("16", "right,64px"), - ("17", "right,68px"), - ("18", "right,72px"), - ("19", "right,76px"), - ("20", "right,80px"), + ("0", "right,0px"), + ("px", "right,1px"), + ("0.5", "right,0.125rem"), + ("1", "right,0.25rem"), + ("1.5", "right,0.375rem"), + ("2", "right,0.5rem"), + ("2.5", "right,0.625rem"), + ("3", "right,0.75rem"), + ("3.5", "right,0.875rem"), + ("4", "right,1rem"), + ("5", "right,1.25rem"), + ("6", "right,1.5rem"), + ("7", "right,1.75rem"), + ("8", "right,2rem"), + ("9", "right,2.25rem"), + ("10", "right,2.5rem"), + ("11", "right,2.75rem"), + ("12", "right,3rem"), + ("14", "right,3.5rem"), + ("16", "right,4rem"), + ("20", "right,5rem"), + ("24", "right,6rem"), + ("28", "right,7rem"), + ("32", "right,8rem"), + ("36", "right,9rem"), + ("40", "right,10rem"), + ("44", "right,11rem"), + ("48", "right,12rem"), + ("52", "right,13rem"), + ("56", "right,14rem"), + ("60", "right,15rem"), + ("64", "right,16rem"), + ("72", "right,18rem"), + ("80", "right,20rem"), + ("96", "right,24rem") + ] +); + +// Margin inline start classes +dwgenerate_map!( + "ms", + "margin-inline-start-", + [ + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem") + ] +); + +// Margin inline end classes +dwgenerate_map!( + "me", + "margin-inline-end-", + [ + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem") ] ); @@ -477,27 +685,41 @@ dwgenerate_map!( "mx", "margin-x-", [ - ("0", "0"), - ("1", "4px"), - ("2", "8px"), - ("3", "12px"), - ("4", "16px"), - ("5", "20px"), - ("6", "24px"), - ("7", "28px"), - ("8", "32px"), - ("9", "36px"), - ("10", "40px"), - ("11", "44px"), - ("12", "48px"), - ("13", "52px"), - ("14", "56px"), - ("15", "60px"), - ("16", "64px"), - ("17", "68px"), - ("18", "72px"), - ("19", "76px"), - ("20", "80px"), + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem") ] ); @@ -505,27 +727,41 @@ dwgenerate_map!( "my", "margin-y-", [ - ("0", "0"), - ("1", "4px"), - ("2", "8px"), - ("3", "12px"), - ("4", "16px"), - ("5", "20px"), - ("6", "24px"), - ("7", "28px"), - ("8", "32px"), - ("9", "36px"), - ("10", "40px"), - ("11", "44px"), - ("12", "48px"), - ("13", "52px"), - ("14", "56px"), - ("15", "60px"), - ("16", "64px"), - ("17", "68px"), - ("18", "72px"), - ("19", "76px"), - ("20", "80px"), + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem") ] ); @@ -534,27 +770,46 @@ dwgenerate_map!( "pt", "padding-dir-", [ - ("0", "top,0"), - ("1", "top,4px"), - ("2", "top,8px"), - ("3", "top,12px"), - ("4", "top,16px"), - ("5", "top,20px"), - ("6", "top,24px"), - ("7", "top,28px"), - ("8", "top,32px"), - ("9", "top,36px"), - ("10", "top,40px"), - ("11", "top,44px"), - ("12", "top,48px"), + ("0", "top,0px"), + ("px", "top,1px"), + ("0.5", "top,0.125rem"), + ("1", "top,0.25rem"), + ("1.5", "top,0.375rem"), + ("2", "top,0.5rem"), + ("2.5", "top,0.625rem"), + ("3", "top,0.75rem"), + ("3.5", "top,0.875rem"), + ("4", "top,1rem"), + ("5", "top,1.25rem"), + ("6", "top,1.5rem"), + ("7", "top,1.75rem"), + ("8", "top,2rem"), + ("9", "top,2.25rem"), + ("10", "top,2.5rem"), + ("11", "top,2.75rem"), + ("12", "top,3rem"), ("13", "top,52px"), - ("14", "top,56px"), + ("14", "top,3.5rem"), ("15", "top,60px"), - ("16", "top,64px"), + ("16", "top,4rem"), ("17", "top,68px"), ("18", "top,72px"), ("19", "top,76px"), - ("20", "top,80px"), + ("20", "top,5rem"), + ("24", "top,6rem"), + ("28", "top,7rem"), + ("32", "top,8rem"), + ("36", "top,9rem"), + ("40", "top,10rem"), + ("44", "top,11rem"), + ("48", "top,12rem"), + ("52", "top,13rem"), + ("56", "top,14rem"), + ("60", "top,15rem"), + ("64", "top,16rem"), + ("72", "top,18rem"), + ("80", "top,20rem"), + ("96", "top,24rem") ] ); @@ -562,27 +817,46 @@ dwgenerate_map!( "pb", "padding-dir-", [ - ("0", "bottom,0"), - ("1", "bottom,4px"), - ("2", "bottom,8px"), - ("3", "bottom,12px"), - ("4", "bottom,16px"), - ("5", "bottom,20px"), - ("6", "bottom,24px"), - ("7", "bottom,28px"), - ("8", "bottom,32px"), - ("9", "bottom,36px"), - ("10", "bottom,40px"), - ("11", "bottom,44px"), - ("12", "bottom,48px"), + ("0", "bottom,0px"), + ("px", "bottom,1px"), + ("0.5", "bottom,0.125rem"), + ("1", "bottom,0.25rem"), + ("1.5", "bottom,0.375rem"), + ("2", "bottom,0.5rem"), + ("2.5", "bottom,0.625rem"), + ("3", "bottom,0.75rem"), + ("3.5", "bottom,0.875rem"), + ("4", "bottom,1rem"), + ("5", "bottom,1.25rem"), + ("6", "bottom,1.5rem"), + ("7", "bottom,1.75rem"), + ("8", "bottom,2rem"), + ("9", "bottom,2.25rem"), + ("10", "bottom,2.5rem"), + ("11", "bottom,2.75rem"), + ("12", "bottom,3rem"), ("13", "bottom,52px"), - ("14", "bottom,56px"), + ("14", "bottom,3.5rem"), ("15", "bottom,60px"), - ("16", "bottom,64px"), + ("16", "bottom,4rem"), ("17", "bottom,68px"), ("18", "bottom,72px"), ("19", "bottom,76px"), - ("20", "bottom,80px"), + ("20", "bottom,5rem"), + ("24", "bottom,6rem"), + ("28", "bottom,7rem"), + ("32", "bottom,8rem"), + ("36", "bottom,9rem"), + ("40", "bottom,10rem"), + ("44", "bottom,11rem"), + ("48", "bottom,12rem"), + ("52", "bottom,13rem"), + ("56", "bottom,14rem"), + ("60", "bottom,15rem"), + ("64", "bottom,16rem"), + ("72", "bottom,18rem"), + ("80", "bottom,20rem"), + ("96", "bottom,24rem") ] ); @@ -590,27 +864,46 @@ dwgenerate_map!( "pl", "padding-dir-", [ - ("0", "left,0"), - ("1", "left,4px"), - ("2", "left,8px"), - ("3", "left,12px"), - ("4", "left,16px"), - ("5", "left,20px"), - ("6", "left,24px"), - ("7", "left,28px"), - ("8", "left,32px"), - ("9", "left,36px"), - ("10", "left,40px"), - ("11", "left,44px"), - ("12", "left,48px"), + ("0", "left,0px"), + ("px", "left,1px"), + ("0.5", "left,0.125rem"), + ("1", "left,0.25rem"), + ("1.5", "left,0.375rem"), + ("2", "left,0.5rem"), + ("2.5", "left,0.625rem"), + ("3", "left,0.75rem"), + ("3.5", "left,0.875rem"), + ("4", "left,1rem"), + ("5", "left,1.25rem"), + ("6", "left,1.5rem"), + ("7", "left,1.75rem"), + ("8", "left,2rem"), + ("9", "left,2.25rem"), + ("10", "left,2.5rem"), + ("11", "left,2.75rem"), + ("12", "left,3rem"), ("13", "left,52px"), - ("14", "left,56px"), + ("14", "left,3.5rem"), ("15", "left,60px"), - ("16", "left,64px"), + ("16", "left,4rem"), ("17", "left,68px"), ("18", "left,72px"), ("19", "left,76px"), - ("20", "left,80px"), + ("20", "left,5rem"), + ("24", "left,6rem"), + ("28", "left,7rem"), + ("32", "left,8rem"), + ("36", "left,9rem"), + ("40", "left,10rem"), + ("44", "left,11rem"), + ("48", "left,12rem"), + ("52", "left,13rem"), + ("56", "left,14rem"), + ("60", "left,15rem"), + ("64", "left,16rem"), + ("72", "left,18rem"), + ("80", "left,20rem"), + ("96", "left,24rem") ] ); @@ -618,27 +911,46 @@ dwgenerate_map!( "pr", "padding-dir-", [ - ("0", "right,0"), - ("1", "right,4px"), - ("2", "right,8px"), - ("3", "right,12px"), - ("4", "right,16px"), - ("5", "right,20px"), - ("6", "right,24px"), - ("7", "right,28px"), - ("8", "right,32px"), - ("9", "right,36px"), - ("10", "right,40px"), - ("11", "right,44px"), - ("12", "right,48px"), + ("0", "right,0px"), + ("px", "right,1px"), + ("0.5", "right,0.125rem"), + ("1", "right,0.25rem"), + ("1.5", "right,0.375rem"), + ("2", "right,0.5rem"), + ("2.5", "right,0.625rem"), + ("3", "right,0.75rem"), + ("3.5", "right,0.875rem"), + ("4", "right,1rem"), + ("5", "right,1.25rem"), + ("6", "right,1.5rem"), + ("7", "right,1.75rem"), + ("8", "right,2rem"), + ("9", "right,2.25rem"), + ("10", "right,2.5rem"), + ("11", "right,2.75rem"), + ("12", "right,3rem"), ("13", "right,52px"), - ("14", "right,56px"), + ("14", "right,3.5rem"), ("15", "right,60px"), - ("16", "right,64px"), + ("16", "right,4rem"), ("17", "right,68px"), ("18", "right,72px"), ("19", "right,76px"), - ("20", "right,80px"), + ("20", "right,5rem"), + ("24", "right,6rem"), + ("28", "right,7rem"), + ("32", "right,8rem"), + ("36", "right,9rem"), + ("40", "right,10rem"), + ("44", "right,11rem"), + ("48", "right,12rem"), + ("52", "right,13rem"), + ("56", "right,14rem"), + ("60", "right,15rem"), + ("64", "right,16rem"), + ("72", "right,18rem"), + ("80", "right,20rem"), + ("96", "right,24rem") ] ); @@ -647,27 +959,46 @@ dwgenerate_map!( "px", "padding-x-", [ - ("0", "0"), - ("1", "4px"), - ("2", "8px"), - ("3", "12px"), - ("4", "16px"), - ("5", "20px"), - ("6", "24px"), - ("7", "28px"), - ("8", "32px"), - ("9", "36px"), - ("10", "40px"), - ("11", "44px"), - ("12", "48px"), - ("13", "52px"), - ("14", "56px"), - ("15", "60px"), - ("16", "64px"), - ("17", "68px"), - ("18", "72px"), - ("19", "76px"), - ("20", "80px"), + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("13", "3.25rem"), + ("14", "3.5rem"), + ("15", "3.75rem"), + ("16", "4rem"), + ("17", "4.25rem"), + ("18", "4.5rem"), + ("19", "4.75rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem") ] ); @@ -675,26 +1006,131 @@ dwgenerate_map!( "py", "padding-y-", [ - ("0", "0"), - ("1", "4px"), - ("2", "8px"), - ("3", "12px"), - ("4", "16px"), - ("5", "20px"), - ("6", "24px"), - ("7", "28px"), - ("8", "32px"), - ("9", "36px"), - ("10", "40px"), - ("11", "44px"), - ("12", "48px"), - ("13", "52px"), - ("14", "56px"), - ("15", "60px"), - ("16", "64px"), - ("17", "68px"), - ("18", "72px"), - ("19", "76px"), - ("20", "80px"), + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("13", "3.25rem"), + ("14", "3.5rem"), + ("15", "3.75rem"), + ("16", "4rem"), + ("17", "4.25rem"), + ("18", "4.5rem"), + ("19", "4.75rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem") + ] +); + +// Padding inline start classes +dwgenerate_map!( + "ps", + "padding-inline-start-", + [ + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem") ] ); + +// Padding inline end classes +dwgenerate_map!( + "pe", + "padding-inline-end-", + [ + ("0", "0px"), + ("px", "1px"), + ("0.5", "0.125rem"), + ("1", "0.25rem"), + ("1.5", "0.375rem"), + ("2", "0.5rem"), + ("2.5", "0.625rem"), + ("3", "0.75rem"), + ("3.5", "0.875rem"), + ("4", "1rem"), + ("5", "1.25rem"), + ("6", "1.5rem"), + ("7", "1.75rem"), + ("8", "2rem"), + ("9", "2.25rem"), + ("10", "2.5rem"), + ("11", "2.75rem"), + ("12", "3rem"), + ("14", "3.5rem"), + ("16", "4rem"), + ("20", "5rem"), + ("24", "6rem"), + ("28", "7rem"), + ("32", "8rem"), + ("36", "9rem"), + ("40", "10rem"), + ("44", "11rem"), + ("48", "12rem"), + ("52", "13rem"), + ("56", "14rem"), + ("60", "15rem"), + ("64", "16rem"), + ("72", "18rem"), + ("80", "20rem"), + ("96", "24rem") + ] +); \ No newline at end of file diff --git a/crates/dwui/Cargo.toml b/crates/dwui/Cargo.toml index 25d51bb..e15c273 100644 --- a/crates/dwui/Cargo.toml +++ b/crates/dwui/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dwui" -version = "0.7.0" +version = "0.7.1" edition = "2021" description = "UI Component library built on the DWIND style crate!" homepage = "https://github.com/JedimEmO/dwind" @@ -11,13 +11,13 @@ keywords = ["web", "wasm", "css", "style"] [dependencies] const_format = { workspace = true } dominator = { workspace = true } -dwind = { path = "../dwind", version = "0.5.0" } -dwind-macros = { path = "../dwind-macros", version = "0.3.0" } +dwind = { path = "../dwind", version = "0.6.0" } +dwind-macros = { path = "../dwind-macros", version = "0.4.0" } futures-signals = { workspace = true } futures-signals-component-macro = { workspace = true } once_cell = { workspace = true } web-sys = { workspace = true } [build-dependencies] -dominator-css-bindgen = { path = "../dominator-css-bindgen", version = "0.1.1" } +dominator-css-bindgen = { path = "../dominator-css-bindgen", version = "0.2.0" } serde = { workspace = true } diff --git a/crates/dwui/src/components/input/validation.rs b/crates/dwui/src/components/input/validation.rs index c2d437a..bd01cad 100644 --- a/crates/dwui/src/components/input/validation.rs +++ b/crates/dwui/src/components/input/validation.rs @@ -1,4 +1,4 @@ -use futures_signals::signal::{BoxSignal, LocalBoxSignal, Mutable, Signal, SignalExt}; +use futures_signals::signal::{LocalBoxSignal, Mutable, SignalExt}; use std::str::FromStr; #[derive(Debug, Clone, PartialEq)] diff --git a/crates/modern-normalize-cssys/Cargo.toml b/crates/modern-normalize-cssys/Cargo.toml index 882f88b..b192452 100644 --- a/crates/modern-normalize-cssys/Cargo.toml +++ b/crates/modern-normalize-cssys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "modern-normalize-cssys" -version = "0.2.1" +version = "0.2.2" edition = "2021" description = "rust bindings for modern-normalize for the DWIND crate" homepage = "https://github.com/JedimEmO/dwind" @@ -10,12 +10,12 @@ keywords = ["web", "wasm", "css", "style"] [dependencies] dominator = { workspace = true } -dominator-css-bindgen = { path = "../dominator-css-bindgen", version = "0.1.1" } +dominator-css-bindgen = { path = "../dominator-css-bindgen", version = "0.2.0" } once_cell = { workspace = true } web-sys = { workspace = true } [build-dependencies] -dominator-css-bindgen = { path = "../dominator-css-bindgen", version = "0.1.1" } +dominator-css-bindgen = { path = "../dominator-css-bindgen", version = "0.2.0" } [dev-dependencies] wasm-bindgen-test = { workspace = true } diff --git a/crates/tests/dominator-css-bindgen-test/Cargo.toml b/crates/tests/dominator-css-bindgen-test/Cargo.toml index b9fdc22..764e51b 100644 --- a/crates/tests/dominator-css-bindgen-test/Cargo.toml +++ b/crates/tests/dominator-css-bindgen-test/Cargo.toml @@ -6,8 +6,8 @@ publish = false [dependencies] dominator = { workspace = true} -dominator-css-bindgen = { path = "../../dominator-css-bindgen", version = "0.1.1" } +dominator-css-bindgen = { path = "../../dominator-css-bindgen", version = "0.2.0" } once_cell = { workspace = true} [build-dependencies] -dominator-css-bindgen = { path = "../../dominator-css-bindgen", version = "0.1.1" } +dominator-css-bindgen = { path = "../../dominator-css-bindgen", version = "0.2.0" } diff --git a/examples/webpage/Cargo.toml b/examples/webpage/Cargo.toml index d75a420..684d3ee 100644 --- a/examples/webpage/Cargo.toml +++ b/examples/webpage/Cargo.toml @@ -12,19 +12,19 @@ crate-type = ["cdylib"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -const_format = { workspace = true} -dominator = { workspace = true} -dwind = { path = "../../crates/dwind", version = "0.5.0" } -dwind-macros = { path = "../../crates/dwind-macros", version = "0.3.0" } -dwui = { path = "../../crates/dwui", version = "0.7.0" } +const_format = { workspace = true } +dominator = { workspace = true } +dwind = { path = "../../crates/dwind", version = "0.6.0" } +dwind-macros = { path = "../../crates/dwind-macros", version = "0.4.0" } +dwui = { path = "../../crates/dwui", version = "0.7.1" } example-html-highlight-macro = { path = "../../crates/example-html-macro", version = "0.1.1" } -futures = { workspace = true} -futures-signals = { workspace = true} -gloo-timers = { workspace = true, features = ["futures"]} -log = { workspace = true} -matchit = { workspace = true} -once_cell = { workspace = true} -wasm-bindgen = { workspace = true} -wasm-bindgen-futures = { workspace = true} -wasm-log = { workspace = true} -web-sys = { workspace = true} +futures = { workspace = true } +futures-signals = { workspace = true } +gloo-timers = { workspace = true, features = ["futures"] } +log = { workspace = true } +matchit = { workspace = true } +once_cell = { workspace = true } +wasm-bindgen = { workspace = true } +wasm-bindgen-futures = { workspace = true } +wasm-log = { workspace = true } +web-sys = { workspace = true }