Skip to content

Commit 02d8063

Browse files
authored
Merge branch 'main' into task/MOOSE-337/interactive-card-hovers
2 parents 2daf2ba + e635c9d commit 02d8063

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ item (Added, Changed, Depreciated, Removed, Fixed, Security).
77
## [2026.01]
88

99
- Updated: Interactive card blocks now use the animated underline on the title element on hover.
10+
- Fixed: Vertical Tabs block now scrolls the selected tab into view on mobile, respecting reduced motion preferences. [MOOSE-333](https://moderntribe.atlassian.net/browse/MOOSE-333)
11+
- Fixed: Removed top margin from spacer block
1012
- Added: Yoast Duplicate Post plugin v4.5 for easier content duplication in the editor.
1113
- Updated: Login logo styling
1214

wp-content/themes/core/assets/js/utils/tabs.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,17 @@ const switchTabs = ( targetTabButton ) => {
194194
tabButton
195195
);
196196
} );
197+
198+
// On mobile, scroll the selected tab into view so the user doesn't have to scroll back up
199+
if ( config.isMobile && config.contentMergesOnMobile ) {
200+
const prefersReducedMotion = window.matchMedia(
201+
'(prefers-reduced-motion: reduce)'
202+
).matches;
203+
targetTabButton.scrollIntoView( {
204+
behavior: prefersReducedMotion ? 'auto' : 'smooth',
205+
block: 'start',
206+
} );
207+
}
197208
};
198209

199210
/**

wp-content/themes/core/blocks/tribe/vertical-tabs/style.pcss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
border-left: 3px solid var(--vertical-tabs-border-color);
4242
transition: var(--transition);
4343

44+
/* Account for sticky header when scrolling tab into view on mobile */
45+
@media (--mq-wp-small-max) {
46+
scroll-margin-top: calc(var(--masthead-mobile-height) + var(--spacer-20));
47+
}
48+
4449
&[aria-selected="true"],
4550
&.editor-is-selected {
4651
pointer-events: none;

wp-content/themes/core/theme.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,14 @@
629629
}
630630
}
631631
},
632+
"core/spacer": {
633+
"spacing": {
634+
"margin": {
635+
"top": "0",
636+
"bottom": "0"
637+
}
638+
}
639+
},
632640
"core/table": {
633641
"spacing": {
634642
"margin": {

0 commit comments

Comments
 (0)