|
| 1 | +*, |
| 2 | +*::after, |
| 3 | +*::before { |
| 4 | + box-sizing: border-box; |
| 5 | +} |
| 6 | + |
| 7 | +:root { |
| 8 | + font-size: 16px; |
| 9 | + --color-text: #fff; |
| 10 | + --color-bg: #000; |
| 11 | + --color-link: #fff; |
| 12 | + --color-link-hover: #fff; |
| 13 | +} |
| 14 | + |
| 15 | +body { |
| 16 | + margin: 0; |
| 17 | + color: var(--color-text); |
| 18 | + background-color: var(--color-bg); |
| 19 | + font-family: "area-normal",-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif; |
| 20 | + font-family: "anonymous-pro", monospace; |
| 21 | + -webkit-font-smoothing: antialiased; |
| 22 | + -moz-osx-font-smoothing: grayscale; |
| 23 | + height: 100%; |
| 24 | + overflow: hidden; |
| 25 | +} |
| 26 | + |
| 27 | +/* Page Loader */ |
| 28 | +.js .loading::before, |
| 29 | +.js .loading::after { |
| 30 | + content: ''; |
| 31 | + position: fixed; |
| 32 | + z-index: 1000; |
| 33 | +} |
| 34 | + |
| 35 | +.js .loading::before { |
| 36 | + top: 0; |
| 37 | + left: 0; |
| 38 | + width: 100%; |
| 39 | + height: 100%; |
| 40 | + background: var(--color-bg); |
| 41 | +} |
| 42 | + |
| 43 | +.js .loading::after { |
| 44 | + top: 50%; |
| 45 | + left: 50%; |
| 46 | + width: 60px; |
| 47 | + height: 60px; |
| 48 | + margin: -30px 0 0 -30px; |
| 49 | + border-radius: 50%; |
| 50 | + opacity: 0.4; |
| 51 | + background: var(--color-link); |
| 52 | + animation: loaderAnim 0.7s linear infinite alternate forwards; |
| 53 | + |
| 54 | +} |
| 55 | + |
| 56 | +@keyframes loaderAnim { |
| 57 | + to { |
| 58 | + opacity: 1; |
| 59 | + transform: scale3d(0.5,0.5,1); |
| 60 | + } |
| 61 | +} |
| 62 | + |
| 63 | +a { |
| 64 | + text-decoration: none; |
| 65 | + color: var(--color-link); |
| 66 | + outline: none; |
| 67 | + cursor: pointer; |
| 68 | +} |
| 69 | + |
| 70 | +a:hover { |
| 71 | + color: var(--color-link-hover); |
| 72 | + outline: none; |
| 73 | +} |
| 74 | + |
| 75 | +/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */ |
| 76 | +a:focus { |
| 77 | + /* Provide a fallback style for browsers |
| 78 | + that don't support :focus-visible */ |
| 79 | + outline: none; |
| 80 | + background: lightgrey; |
| 81 | +} |
| 82 | + |
| 83 | +a:focus:not(:focus-visible) { |
| 84 | + /* Remove the focus indicator on mouse-focus for browsers |
| 85 | + that do support :focus-visible */ |
| 86 | + background: transparent; |
| 87 | +} |
| 88 | + |
| 89 | +a:focus-visible { |
| 90 | + /* Draw a very noticeable focus style for |
| 91 | + keyboard-focus on browsers that do support |
| 92 | + :focus-visible */ |
| 93 | + outline: 2px solid red; |
| 94 | + background: transparent; |
| 95 | +} |
| 96 | + |
| 97 | +.unbutton { |
| 98 | + background: none; |
| 99 | + border: 0; |
| 100 | + padding: 0; |
| 101 | + margin: 0; |
| 102 | + font: inherit; |
| 103 | + cursor: pointer; |
| 104 | +} |
| 105 | + |
| 106 | +.unbutton:focus { |
| 107 | + outline: none; |
| 108 | +} |
| 109 | + |
| 110 | +.frame { |
| 111 | + position: fixed; |
| 112 | + top: 0; |
| 113 | + left: 0; |
| 114 | + width: 100%; |
| 115 | + height: 100vh; |
| 116 | + color: var(--color-title); |
| 117 | + padding: 2rem; |
| 118 | + display: grid; |
| 119 | + grid-template-columns: auto 1fr; |
| 120 | + grid-template-rows: auto auto auto auto 1fr; |
| 121 | + grid-template-areas: 'title title' 'prev back' 'demos demos' 'sponsor sponsor' 'nav nav'; |
| 122 | + justify-content: start; |
| 123 | + align-content: start; |
| 124 | + align-items: start; |
| 125 | + z-index: 100; |
| 126 | + pointer-events: none; |
| 127 | + grid-gap: 1rem; |
| 128 | +} |
| 129 | + |
| 130 | +body #cdawrap { |
| 131 | + align-self: start; |
| 132 | + justify-self: start; |
| 133 | +} |
| 134 | + |
| 135 | +.frame a, |
| 136 | +.frame button { |
| 137 | + pointer-events: auto; |
| 138 | +} |
| 139 | + |
| 140 | +.frame__title { |
| 141 | + grid-area: title; |
| 142 | + display: flex; |
| 143 | + align-items: flex-end; |
| 144 | + font-weight: 400; |
| 145 | +} |
| 146 | + |
| 147 | +.frame strong { |
| 148 | + font-weight: 700; |
| 149 | +} |
| 150 | + |
| 151 | +.frame__title-main { |
| 152 | + font-size: inherit; |
| 153 | + margin: 0; |
| 154 | + font-weight: inherit; |
| 155 | +} |
| 156 | + |
| 157 | +.frame__back { |
| 158 | + grid-area: back; |
| 159 | +} |
| 160 | + |
| 161 | +.frame__prev { |
| 162 | + grid-area: prev; |
| 163 | +} |
| 164 | + |
| 165 | +.frame__demos { |
| 166 | + grid-area: demos; |
| 167 | + display: grid; |
| 168 | + grid-template-columns: repeat(8,auto); |
| 169 | + column-gap: 1rem; |
| 170 | + row-gap: 0.5rem; |
| 171 | +} |
| 172 | + |
| 173 | +.frame__demos span { |
| 174 | + grid-column: 1 / span 8; |
| 175 | +} |
| 176 | + |
| 177 | +a.frame__demo { |
| 178 | + font-weight: 400; |
| 179 | + font-size: 1rem; |
| 180 | + text-decoration: none; |
| 181 | + opacity: 0.5; |
| 182 | + font-family: "anonymous-pro", monospace; |
| 183 | +} |
| 184 | + |
| 185 | +a.frame__demo--current { |
| 186 | + font-weight: 700; |
| 187 | + opacity: 1; |
| 188 | + color: var(--color-link-hover); |
| 189 | +} |
| 190 | + |
| 191 | +.slides { |
| 192 | + width: 100%; |
| 193 | + height: 100vh; |
| 194 | + overflow: hidden; |
| 195 | + display: grid; |
| 196 | + grid-template-rows: 100%; |
| 197 | + grid-template-columns: 100%; |
| 198 | + place-items: center; |
| 199 | +} |
| 200 | + |
| 201 | +.slide { |
| 202 | + width: 100%; |
| 203 | + height: 100%; |
| 204 | + grid-area: 1 / 1 / -1 / -1; |
| 205 | + pointer-events: none; |
| 206 | + opacity: 0; |
| 207 | + overflow: hidden; |
| 208 | + position: relative; |
| 209 | + display: grid; |
| 210 | + place-items: center; |
| 211 | + will-change: transform, opacity; |
| 212 | +} |
| 213 | + |
| 214 | +.slide--current { |
| 215 | + pointer-events: auto; |
| 216 | + opacity: 1; |
| 217 | +} |
| 218 | + |
| 219 | +.deco { |
| 220 | + width: 100%; |
| 221 | + height: 100%; |
| 222 | + grid-area: 1 / 1 / -1 / -1; |
| 223 | + pointer-events: none; |
| 224 | + position: relative; |
| 225 | + opacity: 0; |
| 226 | + background: #8c718e; |
| 227 | + will-change: transform, opacity; |
| 228 | +} |
| 229 | + |
| 230 | +.deco--1 { |
| 231 | + background: #d4503e; |
| 232 | +} |
| 233 | + |
| 234 | +.deco--2 { |
| 235 | + background: #1c1a1a; |
| 236 | +} |
| 237 | + |
| 238 | +.deco--3 { |
| 239 | + background: #4e4141; |
| 240 | +} |
| 241 | + |
| 242 | +.deco--4 { |
| 243 | + background: #000; |
| 244 | +} |
| 245 | + |
| 246 | +.deco--5 { |
| 247 | + background: #060b17; |
| 248 | +} |
| 249 | + |
| 250 | +.deco--6 { |
| 251 | + background: #34365c; |
| 252 | +} |
| 253 | + |
| 254 | +.deco--7 { |
| 255 | + background: #9f6794; |
| 256 | +} |
| 257 | + |
| 258 | +.slide__img { |
| 259 | + width: 100%; |
| 260 | + height: 100%; |
| 261 | + background-size: cover; |
| 262 | + background-position: 50% 50%; |
| 263 | + background-repeat: no-repeat; |
| 264 | + will-change: transform, opacity, filter; |
| 265 | +} |
| 266 | + |
| 267 | +.demo-2 .slide__img { |
| 268 | + width: 120%; |
| 269 | + height: 120%; |
| 270 | +} |
| 271 | + |
| 272 | +.slides-nav { |
| 273 | + grid-area: nav; |
| 274 | + display: flex; |
| 275 | + gap: 0.5rem; |
| 276 | + align-self: end; |
| 277 | + align-items: center; |
| 278 | +} |
| 279 | + |
| 280 | +.slides-nav::before { |
| 281 | + content: 'scroll / drag'; |
| 282 | + margin-right: 2rem; |
| 283 | +} |
| 284 | + |
| 285 | +.slides-nav__item { |
| 286 | + border: 0; |
| 287 | + background: #fff; |
| 288 | + color: #000; |
| 289 | + width: 60px; |
| 290 | + aspect-ratio: 1; |
| 291 | + display: grid; |
| 292 | + place-items: center; |
| 293 | + border-radius: 50%; |
| 294 | + cursor: pointer; |
| 295 | + transition: background-color 0.3s; |
| 296 | +} |
| 297 | + |
| 298 | +.slides-nav__item:hover { |
| 299 | + background-color: #ccc; |
| 300 | +} |
| 301 | + |
| 302 | + |
| 303 | +@media screen and (min-width: 53em) { |
| 304 | + .frame { |
| 305 | + height: 100vh; |
| 306 | + grid-gap: 2rem; |
| 307 | + align-content: space-between; |
| 308 | + grid-template-columns: auto auto auto 1fr; |
| 309 | + grid-template-rows: auto auto; |
| 310 | + grid-template-areas: 'title back prev demos' 'sponsor ... ... nav '; |
| 311 | + } |
| 312 | + .frame__demos { |
| 313 | + justify-self: end; |
| 314 | + justify-content: end; |
| 315 | + } |
| 316 | + .frame__demos span, |
| 317 | + a.frame__demo { |
| 318 | + text-align: right; |
| 319 | + } |
| 320 | + .slides-nav { |
| 321 | + justify-self: end; |
| 322 | + } |
| 323 | + body #cdawrap { |
| 324 | + align-self: center; |
| 325 | + justify-self: start; |
| 326 | + } |
| 327 | +} |
0 commit comments