Skip to content

Commit f557d4b

Browse files
authored
Merge pull request #311 from moderntribe/task/MOOSE-337/interactive-card-hovers
[MOOSE-337] FE: Interactive Card Animated Underline for Title Elements
2 parents e635c9d + 02d8063 commit f557d4b

File tree

10 files changed

+16
-18
lines changed

10 files changed

+16
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ item (Added, Changed, Depreciated, Removed, Fixed, Security).
66

77
## [2026.01]
88

9+
- Updated: Interactive card blocks now use the animated underline on the title element on hover.
910
- 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)
1011
- Fixed: Removed top margin from spacer block
1112
- Added: Yoast Duplicate Post plugin v4.5 for easier content duplication in the editor.

wp-content/themes/core/blocks/tribe/icon-card/_mixins.pcss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
background-color: var(--icon-card-hover-background-color);
1212

1313
.b-icon-card__title {
14-
text-decoration-color: currentcolor;
14+
15+
@mixin t-animated-underline-hover;
1516
}
1617

1718
.a-btn-ghost {

wp-content/themes/core/blocks/tribe/icon-card/render.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
</div>
3737
<?php endif; ?>
3838
<div class="b-icon-card__content">
39-
<h3 class="t-display-x-small b-icon-card__title"><?php echo esc_html( $title ); ?></h3>
39+
<div class="b-icon-card__title-wrap">
40+
<h3 class="b-icon-card__title t-display-x-small t-animated-underline"><?php echo esc_html( $title ); ?></h3>
41+
</div>
4042
<?php if ( $description ) : ?>
4143
<div class="b-icon-card__description t-body-small">
4244
<?php echo wp_kses_post( nl2br( $description ) ); ?>

wp-content/themes/core/blocks/tribe/icon-card/style.pcss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@
8585

8686
.b-icon-card__title {
8787
margin-top: 0;
88-
text-decoration-thickness: from-font;
89-
text-decoration-color: transparent;
90-
text-decoration-line: underline;
91-
transition: var(--transition);
9288
}
9389

9490
/* -------------------------------------------------------------------------

wp-content/themes/core/blocks/tribe/image-card/_mixins.pcss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
}
1313

1414
.b-image-card__title {
15-
text-decoration-color: currentcolor;
15+
16+
@mixin t-animated-underline-hover;
1617
}
1718

1819
.a-btn-ghost {

wp-content/themes/core/blocks/tribe/image-card/render.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
<?php endif; ?>
3535
<div class="b-image-card__content">
3636
<div class="b-image-card__content-top">
37-
<h3 class="t-display-x-small b-image-card__title"><?php echo esc_html( $title ); ?></h3>
37+
<div class="b-image-card__title-wrap">
38+
<h3 class="b-image-card__title t-display-x-small t-animated-underline"><?php echo esc_html( $title ); ?></h3>
39+
</div>
3840
<?php if ( $description ) : ?>
3941
<div class="t-body-small b-image-card__description">
4042
<?php echo wp_kses_post( nl2br( $description ) ); ?>

wp-content/themes/core/blocks/tribe/image-card/style.pcss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@
8383

8484
.b-image-card__title {
8585
margin-top: 0;
86-
text-decoration-thickness: from-font;
87-
text-decoration-color: transparent;
88-
text-decoration-line: underline;
89-
transition: var(--transition);
9086
}
9187

9288
/* -------------------------------------------------------------------------

wp-content/themes/core/blocks/tribe/image-overlay-card/_mixins.pcss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
}
1212

1313
.b-image-overlay-card__title {
14-
text-decoration-color: currentcolor;
14+
15+
@mixin t-animated-underline-hover;
1516
}
1617

1718
.a-btn-ghost {

wp-content/themes/core/blocks/tribe/image-overlay-card/render.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
</div>
4848
<?php endif; ?>
4949
<div class="b-image-overlay-card__content">
50-
<h3 class="b-image-overlay-card__title t-display-x-small"><?php echo esc_html( $title ); ?></h3>
50+
<div class="b-image-overlay-card__title-wrap">
51+
<h3 class="b-image-overlay-card__title t-display-x-small t-animated-underline"><?php echo esc_html( $title ); ?></h3>
52+
</div>
5153
<?php if ( $link_url ) : ?>
5254
<div class="b-image-overlay-card__buttons l-flex" aria-hidden="true">
5355
<div class="b-image-overlay-card__button">

wp-content/themes/core/blocks/tribe/image-overlay-card/style.pcss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,6 @@
9393

9494
.b-image-overlay-card__title {
9595
margin-top: 0;
96-
text-decoration-thickness: from-font;
97-
text-decoration-color: transparent;
98-
text-decoration-line: underline;
99-
transition: var(--transition);
10096
}
10197

10298
/* -------------------------------------------------------------------------

0 commit comments

Comments
 (0)