Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui: Add `min_size` and `max_size` style methods (#47775)
Danilo Leal40468ed651ba
diff --git a/crates/gpui_macros/src/styles.rs b/crates/gpui_macros/src/styles.rsindex 36d46cfb515..133c9fdebec 100644--- a/crates/gpui_macros/src/styles.rs+++ b/crates/gpui_macros/src/styles.rs@@ -915,8 +915,12 @@ fn box_prefixes() -> Vec<BoxStylePrefix> {fields: vec![quote! {size.width}, quote! {size.height}],doc_string_prefix: "Sets the width and height of the element.",},- // TODO: These don't use the same size ramp as the others- // see https://tailwindcss.com/docs/max-width+ BoxStylePrefix {+ prefix: "min_size",+ auto_allowed: true,+ fields: vec![quote! {min_size.width}, quote! {min_size.height}],+ doc_string_prefix: "Sets the minimum width and height of the element.",+ },BoxStylePrefix {prefix: "min_w",auto_allowed: true,@@ -931,6 +935,12 @@ fn box_prefixes() -> Vec<BoxStylePrefix> {fields: vec![quote! { min_size.height }],doc_string_prefix: "Sets the minimum height of the element. [Docs](https://tailwindcss.com/docs/min-height)",},+ BoxStylePrefix {+ prefix: "max_size",+ auto_allowed: true,+ fields: vec![quote! {max_size.width}, quote! {max_size.height}],+ doc_string_prefix: "Sets the maximum width and height of the element.",+ },// TODO: These don't use the same size ramp as the others// see https://tailwindcss.com/docs/max-widthBoxStylePrefix {