From c3ff2fcc07c3251d395dce64b5f8556ab529e01e Mon Sep 17 00:00:00 2001 From: Zebulan Stanphill Date: Sat, 4 Jul 2020 09:59:53 -0500 Subject: [PATCH] Try moving level tooltips above buttons instead. --- packages/block-library/src/heading/editor.scss | 7 ++++++- .../block-library/src/heading/heading-level-dropdown.js | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/heading/editor.scss b/packages/block-library/src/heading/editor.scss index 4bcaee31c5f0b5..8f9867b04167f2 100644 --- a/packages/block-library/src/heading/editor.scss +++ b/packages/block-library/src/heading/editor.scss @@ -22,7 +22,12 @@ } .block-library-heading__heading-level-dropdown__help { - margin: $grid-unit-20; + margin-left: $grid-unit-20; + margin-right: $grid-unit-20; + + // Override default paragraph margin to optically balance spacing between it + // and the toolbar above. + margin-top: 0; } .block-library-heading__heading-level-warning { diff --git a/packages/block-library/src/heading/heading-level-dropdown.js b/packages/block-library/src/heading/heading-level-dropdown.js index 221f61741c11a2..29007897c9944b 100644 --- a/packages/block-library/src/heading/heading-level-dropdown.js +++ b/packages/block-library/src/heading/heading-level-dropdown.js @@ -120,6 +120,9 @@ export default function HeadingLevelDropdown( { __( 'Heading %d' ), targetLevel ), + // Move tooltips above buttons so they don't overlap + // the help text below. + tooltipPosition: 'top', isActive, onClick() { onChange( targetLevel );