From 1f47ff68e213a90b6ae63d9b3a7f8d098e695cee Mon Sep 17 00:00:00 2001 From: Gavyn McKenzie Date: Mon, 26 Feb 2024 15:58:12 +0000 Subject: [PATCH] feat: make button and input heights match --- components/control/Button/Button.css | 7 ++++++- components/control/Button/Button.stories.ts | 2 +- components/control/Input/Input.css | 13 ++++++------- styles/tokens/button.css | 1 + styles/tokens/input.css | 8 ++++---- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/components/control/Button/Button.css b/components/control/Button/Button.css index 84f0dad..f47541a 100644 --- a/components/control/Button/Button.css +++ b/components/control/Button/Button.css @@ -11,6 +11,8 @@ diamond-button { --_size: 1rem; --_padding-block: var(--diamond-button-padding-block); --_padding-inline: var(--diamond-button-padding-inline); + --_line-height: var(--diamond-button-line-height); + display: inline-block; button, a, @@ -31,7 +33,9 @@ diamond-button { gap: var(--diamond-button-gap); justify-content: center; letter-spacing: inherit; - line-height: var(--diamond-font-line-height); + line-height: var(--_line-height); + min-height: var(--diamond-spacing-thumb); + min-width: var(--diamond-spacing-thumb); padding-block: var(--_padding-block); padding-inline: var(--_padding-inline); -webkit-tap-highlight-color: transparent; @@ -100,6 +104,7 @@ diamond-button { } &[width='square'] { + --_line-height: 1; --_padding-inline: var(--diamond-button-padding-block); } diff --git a/components/control/Button/Button.stories.ts b/components/control/Button/Button.stories.ts index f513350..f88857c 100644 --- a/components/control/Button/Button.stories.ts +++ b/components/control/Button/Button.stories.ts @@ -106,7 +106,7 @@ export const TextButton: StoryObj = { export const IconOnlyButton: StoryObj = { render: () => html` - +