Skip to content

Commit 6721fa3

Browse files
committed
Extract Grid Style 9 image transform and opacity transitions
- Merge pseudo-element patterns with combined gradient and transition properties - Add img-specific display, opacity, and transform transitions with cross-browser support - Include scale3d(1.1) hover transform for enhanced performance - Apply .pp-content-post-grid parent scoping to prevent global conflicts
1 parent d67a750 commit 6721fa3

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

themes/beaver/assets/css/utilities/components/powerpack/content-grid.css

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@
256256
transform: scale(1.1);
257257
}
258258

259-
/* Grid Style 9 Pseudo-element Overlay with Gradient */
259+
/* Grid Style 9 Pseudo-element Overlay with Gradient and Transitions */
260260
.pp-content-post-grid .pp-content-post.pp-grid-style-9 .pp-post-featured-img a:last-child:before {
261261
content: "";
262262
display: block;
263-
height: 70%;
263+
height: 100%;
264264
width: 100%;
265265
position: absolute;
266266
bottom: 0;
@@ -272,4 +272,26 @@
272272
background: -ms-linear-gradient(top, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .7) 100%);
273273
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .7) 100%);
274274
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#b3000000', GradientType=0);
275+
-webkit-transition: background-color .3s ease;
276+
-moz-transition: background-color .3s ease;
277+
-o-transition: background-color .3s ease;
278+
transition: background-color .3s ease;
279+
}
280+
281+
.pp-content-post-grid .pp-content-post.pp-grid-style-9:hover .pp-post-featured-img a:last-child:before {
282+
background-color: rgba(0, 0, 0, .1);
283+
}
284+
285+
/* Grid Style 9 Image Transform and Opacity */
286+
.pp-content-post-grid .pp-content-post.pp-grid-style-9 .pp-post-featured-img img {
287+
display: block;
288+
height: auto;
289+
opacity: 1;
290+
transition: transform 0.3s ease, opacity 0.3s;
291+
-webkit-transition: -webkit-transform 0.3s ease, opacity 0.3s;
292+
transition-timing-function: ease !important;
293+
}
294+
295+
.pp-content-post-grid .pp-content-post.pp-grid-style-9:hover .pp-post-featured-img img {
296+
transform: scale3d(1.1, 1.1, 1);
275297
}

0 commit comments

Comments
 (0)