Spaces:
Sleeping
Sleeping
File size: 3,352 Bytes
fca4ff8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | /*
<!----- V container ----->
<div class='has-carousel'>
<!--- H container --->
<div class='carousel'>
<div>---- <div>---- <div>---- <div>---- <div>----
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
---</div> | | ---</div> | | ---</div>
---</div> ---</div>
</div>
<div>
*/
.carousel {
position: relative;
width: 100%;
overflow: hidden;
}
.carousel__viewport {
display: flex;
height: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scroll-behavior: smooth;
scroll-snap-type: x mandatory;
scrollbar-width: none;
}
ul.carousel__viewport {
border: none;
padding: 0;
}
.carousel__viewport > div,
.carousel__viewport > section,
ul.carousel__viewport > li,
.carousel__viewport__slide {
display: flex;
position: relative;
flex-direction: row;
flex-shrink: 0;
flex-wrap: wrap;
align-items: center;
width: 100%;
scroll-snap-align: start;
}
ul.carousel__viewport > li {
position: relative;
margin: 1ex;
border-radius: 1ex;
background: var(--img) center/cover;
width: 16rem;
height: 12.8rem;
}
ul.carousel__viewport > li > a {
position: absolute;
top: -1px;
right: 0;
bottom: 0;
left: -1px;
border-radius: 0.82ex;
overflow: clip;
color: var(--fg);
font-size: var(--small);
font-weight: bold;
border: none;
}
ul.carousel__viewport > li:hover,
ul.carousel__viewport > li:focus-within {
--tsf: scale(0.96);
opacity: 0.86;
}
ul.carousel__viewport > li > a > span {
position: relative;
border-radius: 0 1ex 1ex 0;
background-color: var(--bg);
padding: 0.7ex 1ex;
max-width: 12.8rem;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
ul.carousel__viewport > li > a > span::before,
ul.carousel__viewport > li > a > span::after {
position: absolute;
border-top-left-radius: 1ex;
box-shadow: 0 -1ex 0 0 var(--bg);
background-color: transparent;
width: 1ex;
height: 2ex;
content: '';
}
ul.carousel__viewport > li > a > span::before {
bottom: -2ex;
left: 0;
}
ul.carousel__viewport > li > a > span::after {
top: 0.5ex;
right: -0.9ex;
}
.tr,
.carousel__viewport__slide > nav a {
display: inline-flex;
padding: 1ex;
gap: 1ex;
}
.pagination .lfill a::after,
.tr::after,
.carousel__viewport__slide:first-child > nav a::after {
/* -> */
--tsf: rotate(90deg);
font-family: base-ui;
content: '\e902';
}
#list-taxonomy > .carousel__viewport {
flex-direction: column;
height: 14.75rem;
overflow-y: auto;
scroll-snap-type: y mandatory;
}
#list-taxonomy {
margin: 1rem 0;
}
#list-taxonomy ul.carousel__viewport {
scrollbar-width: thin;
}
#list-taxonomy ul.carousel__viewport a:hover::after {
position: absolute;
right: 1ex;
bottom: 1ex;
border-radius: 0.7ex;
background: var(--bg);
padding: 0.7ex 0;
width: calc(3.2rem - 2ex);
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
content: attr(data-post-counter);
} |