11// ***** Slideshow Component ***** //
22
3- @mixin slideshow-caption-bg {
4- background-color : rgb (var (--color-medium-blue ) / 90% );
5- }
6-
7- $slideshow-caption-width : 20rem ;
8-
93.c-slideshow {
4+ --slideshow-caption-bg : rgb (var (--color-medium-blue ) / 90% );
5+ --slideshow-caption-width : 20rem ;
6+
107 display : grid ;
118 position : relative ;
129 grid-template-rows : 1fr auto ;
1310
1411 @media (--min-width 1) {
15- grid-template-columns : $ slideshow-caption-width auto ;
12+ grid-template-columns : var ( -- slideshow-caption-width) auto ;
1613 }
1714
1815 // show single random fixed image if display: grid and display: contents css not supported:
@@ -32,14 +29,14 @@ $slideshow-caption-width: 20rem;
3229}
3330
3431.c-slideshow__controls {
35- @include slideshow-caption-bg ;
3632 display : flex ;
3733 z-index : 1 ;
3834 grid-column : 1 ;
3935 grid-row : 2 ;
4036 align-items : center ;
4137 justify-content : space-evenly ;
4238 border-top : 1px solid rgb (var (--color-white ));
39+ background-color : var (--slideshow-caption-bg );
4340
4441 @media (--min-width 1) {
4542 margin : 0 var (--space2 ) var (--space2 ) var (--space2 );
@@ -109,13 +106,13 @@ $slideshow-caption-width: 20rem;
109106}
110107
111108.c-slideshow__slide figcaption {
112- @include slideshow-caption-bg ;
113109 display : flex ; // allows 'read more' link to align to bottom
114110 z-index : -1 ;
115111 grid-column : 1 ;
116112 grid-row : 1 ;
117113 flex-direction : column ;
118114 padding : var (--space2 );
115+ background-color : var (--slideshow-caption-bg );
119116 color : rgb (var (--color-white ));
120117
121118 @media (--min-width 1) {
@@ -180,7 +177,7 @@ $slideshow-caption-width: 20rem;
180177 right : 0 ;
181178 bottom : 0 ;
182179 max-width : 50% ;
183- margin-left : $ slideshow-caption-width ;
180+ margin-left : var ( -- slideshow-caption-width) ;
184181 padding : var (--space2 );
185182 background-color : rgb (var (--color-black ) / 60% );
186183 font-size : 1em ;
0 commit comments