Skip to content

Commit edae3d2

Browse files
authored
Merge pull request #619 from itk-dev/feature/issue-610-upcoming-hover-colors
Add hover effect to reveal accent colors on upcoming timeline cards
2 parents e0e88b9 + 79a5577 commit edae3d2

2 files changed

Lines changed: 70 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
88

9+
* [PR-610](https://github.com/itk-dev/deltag.aarhus.dk/pull/610)
10+
Added hover effect to reveal accent colors on upcoming timeline cards
911
* [PR-593](https://github.com/itk-dev/deltag.aarhus.dk/pull/593)
1012
* Add project timeline
1113
* Add project reference fields to several node types to display on timeline

web/themes/custom/hoeringsportal/assets/css/module/_timeline.scss

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,61 @@ $timeline-image-height: 140px;
599599
);
600600
}
601601

602+
// =============================================================================
603+
// Upcoming Cards - Gray Default with Accent Color on Hover
604+
// =============================================================================
605+
606+
// Reset accent colors to gray for upcoming cards
607+
.project-timeline-card--upcoming {
608+
// Override accent variants to use gray by default
609+
&.project-timeline-card--accent-pink,
610+
&.project-timeline-card--accent-blue {
611+
@include timeline-card-status-variant(
612+
var(--timeline-status-upcoming),
613+
var(--timeline-status-upcoming-bg),
614+
var(--primitive-gray-700)
615+
);
616+
617+
.project-timeline-card__date-wrapper {
618+
color: inherit;
619+
}
620+
}
621+
622+
// Add transitions for smooth color reveal on hover
623+
.project-timeline-card__dot,
624+
.project-timeline-card__status,
625+
.project-timeline-card__link,
626+
.project-timeline-card__subtitle,
627+
.project-timeline-card__date-wrapper {
628+
transition:
629+
background-color 0.2s ease,
630+
color 0.2s ease;
631+
}
632+
633+
&::after,
634+
.project-timeline-card__content::before {
635+
transition: background-color 0.2s ease;
636+
}
637+
638+
// Reveal pink accent on hover
639+
&.project-timeline-card--accent-pink:hover {
640+
@include timeline-card-accent-variant(
641+
var(--timeline-accent-pink),
642+
var(--timeline-accent-pink-bg),
643+
var(--primitive-pink-500)
644+
);
645+
}
646+
647+
// Reveal blue accent on hover
648+
&.project-timeline-card--accent-blue:hover {
649+
@include timeline-card-accent-variant(
650+
var(--timeline-accent-blue),
651+
var(--timeline-accent-blue-bg),
652+
var(--primitive-navy-500)
653+
);
654+
}
655+
}
656+
602657
// =============================================================================
603658
// Mini Navigation - Fixed on Right Side
604659
// =============================================================================
@@ -1201,6 +1256,19 @@ $tablet-card-gap: $timeline-card-padding;
12011256
.project-timeline-card__link {
12021257
transition: none;
12031258
}
1259+
1260+
// Disable hover color transitions for upcoming cards
1261+
.project-timeline-card--upcoming {
1262+
.project-timeline-card__dot,
1263+
.project-timeline-card__status,
1264+
.project-timeline-card__link,
1265+
.project-timeline-card__subtitle,
1266+
.project-timeline-card__date-wrapper,
1267+
&::after,
1268+
.project-timeline-card__content::before {
1269+
transition: none;
1270+
}
1271+
}
12041272
}
12051273

12061274
// =============================================================================

0 commit comments

Comments
 (0)