Repository navigation
fix(animation): align welcome notice button icons - #3178
Open
faisalahammad wants to merge 1 commit into
Open
faisalahammad wants to merge 1 commit into
faisalahammad wants to merge 1 commit into
Conversation
WordPress core sets line-height: 2.3 on dashicons inside hero buttons. That works for inline buttons, but the welcome notice buttons are flex containers, so the tall line box pushes the glyph below the label. The external icon on the Learn More button sat about 15px under the text. Reset the icon line-height to the dashicons base value, scoped to the notice. Covers both hero buttons, LTR and RTL. Fixes Codeinwp#3169
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3169.
Summary
The external-link icon on the "Learn More" button in the Blocks Animation welcome notice sat about 15px below the text. The notice only shows when Blocks Animation is active without Otter.
WordPress core applies
line-height: 2.3to dashicons inside.button-hero(wp-includes/css/buttons.min.css). That value assumes inline buttons. The notice turns its buttons into flex containers withalign-items: center, so the icon's 20px box gets a ~46px line box and the glyph renders below the centered text.This resets the icon line-height to the dashicons base value, scoped to the notice:
The full selector
.otter-animation-welcome-notice .button.button-hero .dashicons(0,5,0) wins over core's.wp-core-ui .button.button-hero .dashicons(0,4,0) regardless of load order. The same offset on the primary button's spinner icon is fixed too. CSS only, no PHP/JS/markup changes.Screenshots
Before (from #3169):
After: the icon sits vertically centered next to the label.
Test instructions
otter_animation_dismiss_welcome_noticeandotter_animation_welcome_notice_display_timeoptions and reload.Expected: both icons aligned, no other visual changes to the notice.
Checklist before the final review
Note on tests: this is a CSS-only change and the repo has no style test harness. The compiled LTR and RTL CSS were checked for the rule, lint passes, and the fix was confirmed manually on a standalone install.