Extract inserter-toggle mixin from duplicated button styles#76087
Extract inserter-toggle mixin from duplicated button styles#76087
Conversation
The dark inserter toggle button styles (background, color, size, hover state) were duplicated across three SCSS files. Extract them into a shared inserter-toggle mixin in base-styles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +17 B (0%) Total Size: 6.87 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 7b7bb72. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22628170833
|
mikachan
left a comment
There was a problem hiding this comment.
Nice refactor! Code changes look good, and it's testing as described. LGTM 🚢
…s#76087) * Extract inserter-toggle mixin from duplicated button styles The dark inserter toggle button styles (background, color, size, hover state) were duplicated across three SCSS files. Extract them into a shared inserter-toggle mixin in base-styles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * add comment --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
What?
Extracts the dark inserter toggle button styles into a shared
inserter-togglemixin inpackages/base-styles/_mixins.scss.Why?
The same button appearance rules (dark background, white icon, 24px size, theme-color hover) were duplicated across three SCSS files:
default-block-appender/content.scss(2 occurrences)block-tools/style.scss(1 occurrence)This duplication makes it easy for the styles to drift apart and harder to maintain. A shared mixin ensures consistency. This will also make it easier to have consistent styles in #75674
How?
@mixin inserter-toggle()topackages/base-styles/_mixins.scsscontaining the common rules:background,color,padding,min-width,height, and:hoverstate.content.scssandstyle.scsswith@include inserter-toggle, keeping any site-specific overrides (e.g.display: none,flex-direction,width).@useimport for mixins incontent.scss(already present instyle.scss).Testing Instructions