:root { --palette-1: #ff0026; --palette-2: #d91e4d; --palette-3: #ff0094; --palette-4: #e000ff; --palette-5: #ff5a00; } body { font-family:system-ui,sans-serif; color: midnightblue; background-image: radial-gradient(circle, lightsteelblue 1px, ghostwhite 1px); background-size: 15px 15px; } a { color: lightpink; text-decoration: none; font-style: italic; } a:hover { font-weight: 1000; /*background: deeppink; color: ghostwhite;*/ } .launcher { overflow: hidden; } .launcher .container { display: flex; align-items: center; justify-content: center; height: 100vh; height: 100dvh; } .launcher .frame { --tile-size: clamp(3.5rem, 22vw, 5.5rem); /* Same value as gap below, just also exposed as a variable -- the shared-backdrop photo math further down (.photo img) needs to read the actual gap size in a calc(), and gap itself isn't readable through var(). */ --frame-gap: clamp(0.35rem, 1vw, 0.75rem); display: grid; grid-template-columns: repeat(3, var(--tile-size)); grid-template-rows: repeat(5, var(--tile-size)); grid-template-areas: "data social phanpy" "code lldap intra" "hdm abs mealie" "trek guide calendar" "config plaza chat"; gap: var(--frame-gap); } .launcher .box { display: flex; align-items: flex-end; justify-content: flex-end; padding: 0.5rem; box-sizing: border-box; } /* Every tile's link text is wrapped in one of these (see index.html). display:contents below 75rem means it's completely inert there -- renders exactly as if the text were directly inside the / itself -- from that width, the 's own background is turned off (.launcher .frame > .box), so the rule above has nothing left to color. Below 75rem .tile-spin is display:contents/invisible, so these are simply inert there and the rules above keep doing the job as before. !important: while the grid animation is running, .tile-spin's background-color is continuously being set by the flash-* keyframes -- a running CSS animation always wins over a static author rule for the same property, no matter how specific, with exactly one exception: !important declarations rank above animations in the cascade. Without it, hovering a tile mid- animation would have no visible effect at all. */ a:nth-child(5n):hover .tile-spin { background: var(--palette-1) !important; } a:nth-child(5n+1):hover .tile-spin { background: var(--palette-2) !important; } a:nth-child(5n+2):hover .tile-spin { background: var(--palette-3) !important; } a:nth-child(5n+3):hover .tile-spin { background: var(--palette-4) !important; } a:nth-child(5n+4):hover .tile-spin { background: var(--palette-5) !important; } a:nth-child(5n):active .tile-spin { background: var(--palette-1) !important; } a:nth-child(5n+1):active .tile-spin { background: var(--palette-2) !important; } a:nth-child(5n+2):active .tile-spin { background: var(--palette-3) !important; } a:nth-child(5n+3):active .tile-spin { background: var(--palette-4) !important; } a:nth-child(5n+4):active .tile-spin { background: var(--palette-5) !important; } .box.social:hover, .box.social:active, .box.social:hover .tile-spin, .box.social:active .tile-spin { background: var(--palette-1) !important; } .box.calendar:hover, .box.calendar:active, .box.calendar:hover .tile-spin, .box.calendar:active .tile-spin { background: var(--palette-2) !important; } .box.data:hover, .box.data:active, .box.data:hover .tile-spin, .box.data:active .tile-spin { background: var(--palette-2) !important; } .box.intra:hover, .box.intra:active, .box.intra:hover .tile-spin, .box.intra:active .tile-spin { background: var(--palette-3) !important; } /* Resting and hover/active are both palette-1 now (see .box.guide further down and its .tile-spin override in the desktop tier above) -- kept as its own rule anyway so guide still reliably outranks the generic hover cycle below it and the plain .box rules, not because hover needs to look any different from rest anymore. */ .box.guide:hover, .box.guide:active, .box.guide:hover .tile-spin, .box.guide:active .tile-spin { background: var(--palette-1) !important; } .frame div,a,label { border-radius:0.35rem; } .box { background: white; --tile-bg: white; --tile-shadow: 0 0.1rem 0.3rem hsla(0,0%,0%, 0.15); box-shadow: var(--tile-shadow); /*box-shadow: 0 0.1rem 0.2rem hsla(205,50%,53%, 0.5);*/ } /* .box.guide (not just .guide) so this reliably outranks both the light and dark-mode .box background rules regardless of source order. palette-1, the actually-red swatch (calendar uses the darker strawberry palette-2 instead) -- only actually visible below 75rem -- from 75rem up .tile-spin carries the real background instead (see its own .box.guide .tile-spin override above), this element's own background is turned off there. */ .box.guide { background: var(--palette-1); --tile-bg: var(--palette-1); } /* .sound is a real