From 76e55f840a94642f436471b87b2d29a48dbf6b8a Mon Sep 17 00:00:00 2001 From: lindsaym-fa Date: Thu, 27 Jun 2024 17:50:03 -0400 Subject: [PATCH] progress on vertical alignment of inline-block elements --- docs/docs/experimental/sandbox.md | 122 ++++++++------------- src/components/checkbox/checkbox.styles.ts | 4 +- src/components/radio/radio.styles.ts | 6 +- src/components/switch/switch.styles.ts | 4 +- 4 files changed, 54 insertions(+), 82 deletions(-) diff --git a/docs/docs/experimental/sandbox.md b/docs/docs/experimental/sandbox.md index 4884946f6..6a6ca8609 100644 --- a/docs/docs/experimental/sandbox.md +++ b/docs/docs/experimental/sandbox.md @@ -176,79 +176,51 @@ layout: page ## Tests ```html {.example} -Medium -

- - Option 1 - Option 2 - -

- - - - - - - Settings - -

- - - - - - - Settings - -

- - - - - - - Settings - -

- - - -

- - Left - Center - Right - - -

- - - Left - Center - Right - - -

- - - Left - Center - Right - - -

- - - Left - Center - Right - - -

- - - Left - Center - Right - + +
+ OCBS + OCBS + OCBS + OCBS +
+
+ OCBS + OCBS + OCBS + OCBS +
+
+ OCBS + OCBS + OCBS + OCBS +
+
+ + OCBS +
+
+ OCBS + OCBS + +
+
+ OCBS + OCBS +
``` \ No newline at end of file diff --git a/src/components/checkbox/checkbox.styles.ts b/src/components/checkbox/checkbox.styles.ts index 0b8ec0c89..829eded88 100644 --- a/src/components/checkbox/checkbox.styles.ts +++ b/src/components/checkbox/checkbox.styles.ts @@ -20,7 +20,7 @@ export default css` .checkbox { position: relative; - display: inline-flex; + display: flex; align-items: flex-start; font: inherit; color: var(--wa-form-control-value-color); @@ -43,7 +43,7 @@ export default css` .checkbox__control { flex: 0 0 auto; position: relative; - display: inline-flex; + display: flex; align-items: center; justify-content: center; width: var(--toggle-size); diff --git a/src/components/radio/radio.styles.ts b/src/components/radio/radio.styles.ts index 4d90d989e..b94df82d2 100644 --- a/src/components/radio/radio.styles.ts +++ b/src/components/radio/radio.styles.ts @@ -21,7 +21,7 @@ export default css` } .radio { - display: inline-flex; + display: flex; align-items: top; font: inherit; color: var(--wa-form-control-value-color); @@ -42,7 +42,7 @@ export default css` } .radio__checked-icon { - display: inline-flex; + display: flex; fill: currentColor; width: var(--toggle-size); height: var(--toggle-size); @@ -52,7 +52,7 @@ export default css` .radio__control { flex: 0 0 auto; position: relative; - display: inline-flex; + display: flex; align-items: center; justify-content: center; width: var(--toggle-size); diff --git a/src/components/switch/switch.styles.ts b/src/components/switch/switch.styles.ts index ed995abb7..151e0cd32 100644 --- a/src/components/switch/switch.styles.ts +++ b/src/components/switch/switch.styles.ts @@ -33,7 +33,7 @@ export default css` .switch { position: relative; - display: inline-flex; + display: flex; align-items: center; font: inherit; color: var(--wa-form-control-value-color); @@ -44,7 +44,7 @@ export default css` .switch__control { flex: 0 0 auto; position: relative; - display: inline-flex; + display: flex; align-items: center; justify-content: center; width: var(--width);