Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add fraction sizes for tailwind lengths

Nate Butler7f85780c78c3
diff --git a/crates/gpui2_macros/src/styleable_helpers.rs b/crates/gpui2_macros/src/styleable_helpers.rs
index 7ce38001503..6aecbf62889 100644
--- a/crates/gpui2_macros/src/styleable_helpers.rs
+++ b/crates/gpui2_macros/src/styleable_helpers.rs
@@ -62,9 +62,13 @@ fn generate_methods() -> Vec<TokenStream2> {
fn tailwind_lengths() -> Vec<(&'static str, TokenStream2)> {
vec![
("0", quote! { pixels(0.) }),
+ ("0p5", quote! { rems(0.125) }),
("1", quote! { rems(0.25) }),
+ ("1p5", quote! { rems(0.375) }),
("2", quote! { rems(0.5) }),
+ ("2p5", quote! { rems(0.625) }),
("3", quote! { rems(0.75) }),
+ ("3p5", quote! { rems(0.875) }),
("4", quote! { rems(1.) }),
("5", quote! { rems(1.25) }),
("6", quote! { rems(1.5) }),
diff --git a/crates/storybook/src/collab_panel.rs b/crates/storybook/src/collab_panel.rs
index 64be2db4f2f..cc45dc6c4c6 100644
--- a/crates/storybook/src/collab_panel.rs
+++ b/crates/storybook/src/collab_panel.rs
@@ -128,8 +128,8 @@ impl<V: 'static> CollabPanelElement<V> {
.text_sm()
.child(
div()
- .w_4()
- .h_4()
+ .w_3p5()
+ .h_3p5()
.fill(theme.middle.negative.default.foreground),
)
.child("maxbrunsfeld"),
@@ -142,8 +142,8 @@ impl<V: 'static> CollabPanelElement<V> {
.items_center()
.child(
div()
- .w_3_5()
- .h_3_5()
+ .w_4()
+ .h_4()
.fill(theme.middle.negative.default.foreground),
)
.child("i"),