From a2d5b6c22c5200939bf5d4122716c1b56bf22081 Mon Sep 17 00:00:00 2001 From: ramonjd Date: Thu, 11 Nov 2021 09:26:29 +1100 Subject: [PATCH 1/3] Overwrite default component view label styles so that the Typography control labels are uniform Organize imports alphabetically Remove hyphen from label --- .../src/components/letter-spacing-control/index.js | 3 ++- .../src/components/letter-spacing-control/style.scss | 6 ++++++ packages/block-editor/src/hooks/typography.js | 2 +- packages/block-editor/src/style.scss | 7 ++++--- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 packages/block-editor/src/components/letter-spacing-control/style.scss diff --git a/packages/block-editor/src/components/letter-spacing-control/index.js b/packages/block-editor/src/components/letter-spacing-control/index.js index 0c44196673f20..092f208c4fae9 100644 --- a/packages/block-editor/src/components/letter-spacing-control/index.js +++ b/packages/block-editor/src/components/letter-spacing-control/index.js @@ -33,7 +33,8 @@ export default function LetterSpacingControl( { } ); return ( .components-text.components-input-control__label { + padding-bottom: 0; + margin-bottom: 8px; + line-height: inherit; +} diff --git a/packages/block-editor/src/hooks/typography.js b/packages/block-editor/src/hooks/typography.js index 847c6b9c8d52a..9b5d8fd28c9a3 100644 --- a/packages/block-editor/src/hooks/typography.js +++ b/packages/block-editor/src/hooks/typography.js @@ -218,7 +218,7 @@ export function TypographyPanel( props ) { hasLetterSpacingValue( props ) } - label={ __( 'Letter-spacing' ) } + label={ __( 'Letter spacing' ) } onDeselect={ () => resetLetterSpacing( props ) } isShownByDefault={ defaultControls?.letterSpacing } resetAllFilter={ createResetAllFilter( 'letterSpacing' ) } diff --git a/packages/block-editor/src/style.scss b/packages/block-editor/src/style.scss index de72069bcde14..374e84ac1da83 100644 --- a/packages/block-editor/src/style.scss +++ b/packages/block-editor/src/style.scss @@ -32,12 +32,13 @@ @import "./components/default-block-appender/style.scss"; @import "./components/duotone-control/style.scss"; @import "./components/font-appearance-control/style.scss"; -@import "./components/justify-content-control/style.scss"; -@import "./components/link-control/style.scss"; -@import "./components/line-height-control/style.scss"; @import "./components/image-size-control/style.scss"; @import "./components/inner-blocks/style.scss"; @import "./components/inserter-list-item/style.scss"; +@import "./components/justify-content-control/style.scss"; +@import "./components/letter-spacing-control/style.scss"; +@import "./components/line-height-control/style.scss"; +@import "./components/link-control/style.scss"; @import "./components/list-view/style.scss"; @import "./components/media-replace-flow/style.scss"; @import "./components/media-placeholder/style.scss"; From 5f7626d21641f3cb6bff6ea2e8c892ea5df36dac Mon Sep 17 00:00:00 2001 From: ramonjd Date: Thu, 11 Nov 2021 13:31:26 +1100 Subject: [PATCH 2/3] Rolling back margin changes since they'll be fixed in https://github.com/WordPress/gutenberg/pull/36387 --- .../src/components/letter-spacing-control/style.scss | 6 ------ packages/block-editor/src/style.scss | 1 - 2 files changed, 7 deletions(-) delete mode 100644 packages/block-editor/src/components/letter-spacing-control/style.scss diff --git a/packages/block-editor/src/components/letter-spacing-control/style.scss b/packages/block-editor/src/components/letter-spacing-control/style.scss deleted file mode 100644 index a60d8c68c0b84..0000000000000 --- a/packages/block-editor/src/components/letter-spacing-control/style.scss +++ /dev/null @@ -1,6 +0,0 @@ -// Needs specificity to override the very specific generated View component CSS. -.block-editor-letter-spacing-control .components-flex-item > .components-text.components-input-control__label { - padding-bottom: 0; - margin-bottom: 8px; - line-height: inherit; -} diff --git a/packages/block-editor/src/style.scss b/packages/block-editor/src/style.scss index 374e84ac1da83..4c4927c11b2ab 100644 --- a/packages/block-editor/src/style.scss +++ b/packages/block-editor/src/style.scss @@ -36,7 +36,6 @@ @import "./components/inner-blocks/style.scss"; @import "./components/inserter-list-item/style.scss"; @import "./components/justify-content-control/style.scss"; -@import "./components/letter-spacing-control/style.scss"; @import "./components/line-height-control/style.scss"; @import "./components/link-control/style.scss"; @import "./components/list-view/style.scss"; From a0e8ad54a3bd704f0c2f3f0a87f5a3186a9debde Mon Sep 17 00:00:00 2001 From: Ramon Date: Tue, 16 Nov 2021 10:23:50 +1100 Subject: [PATCH 3/3] Remove classname --- .../block-editor/src/components/letter-spacing-control/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/block-editor/src/components/letter-spacing-control/index.js b/packages/block-editor/src/components/letter-spacing-control/index.js index 092f208c4fae9..5ea63e0fbb5da 100644 --- a/packages/block-editor/src/components/letter-spacing-control/index.js +++ b/packages/block-editor/src/components/letter-spacing-control/index.js @@ -33,7 +33,6 @@ export default function LetterSpacingControl( { } ); return (