Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 3,980 Bytes
d15f07c | 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 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | /* The home topic switcher (#1350): a compact, sideways-scrolling chip row above the hero headline. */
.home-tbar {
position: relative;
margin: 0 0 6px;
min-height: 44px;
}
.home-tbar-scroll {
display: flex;
align-items: center;
gap: 8px;
overflow-x: auto;
padding: 3px 28px 3px 2px;
scrollbar-width: none;
-webkit-overflow-scrolling: touch;
}
.home-tbar-scroll::-webkit-scrollbar {
display: none;
}
.home-tbar-list {
display: flex;
gap: 8px;
}
.home-tbar-tail {
display: flex;
flex: none;
align-items: center;
gap: 8px;
}
.home-tbar-chip {
flex: none;
display: inline-flex;
align-items: center;
min-height: 36px;
padding: 0 14px;
border-radius: 999px;
border: 1px solid #d6d3d1;
background: #fff;
color: #44403c;
font: inherit;
font-size: 14px;
font-weight: 600;
white-space: nowrap;
text-decoration: none;
cursor: pointer;
}
.home-tbar-chip:hover {
background: #f0fdfa;
border-color: #0f766e;
color: #0f766e;
}
.home-tbar-chip.is-on,
.home-tbar-chip.is-on:hover {
background: #0f766e;
border-color: #0f766e;
color: #fff;
}
.home-tbar-chip.is-all {
border-style: dashed;
color: #0f766e;
}
.home-tbar-chip:focus-visible {
outline: 3px solid #0f766e;
outline-offset: 2px;
}
/* The fade on the right edge says "more this way"; it goes once the row is scrolled to its end. */
.home-tbar::after {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 32px;
pointer-events: none;
background: linear-gradient(to right, rgba(250, 250, 249, 0), #fafaf9);
transition: opacity 120ms;
}
.home-tbar[data-at-end]::after {
opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
.home-tbar::after {
transition: none;
}
}
/* #1416: badges and the live-story dot on a pill. */
.home-tbar-dot {
width: 6px;
height: 6px;
margin-right: 7px;
border-radius: 50%;
background: #0f766e;
flex: none;
}
.home-tbar-chip.is-on .home-tbar-dot {
background: #fff;
}
.home-tbar-badges {
display: inline-flex;
gap: 3px;
margin-left: 6px;
font-size: 11px;
line-height: 1;
}
.home-tbar-badges [data-badge='rising'] {
color: #0f766e;
}
.home-tbar-chip.is-on .home-tbar-badges [data-badge='rising'] {
color: #ccfbf1;
}
.home-tbar-chip.is-pending {
animation: home-tbar-pulse 900ms ease-in-out infinite alternate;
}
@keyframes home-tbar-pulse {
from {
opacity: 1;
}
to {
opacity: 0.72;
}
}
.home-tbar-chip.is-more {
border-style: solid;
color: #44403c;
}
/* Desktop: the pills wrap to at most two rows; More opens the rest. Phones keep the one scrolling row above. */
@media (min-width: 768px) {
.home-tbar::after {
display: none;
}
.home-tbar-scroll {
overflow: visible;
align-items: flex-start;
padding-right: 2px;
}
.home-tbar-list {
flex: 1 1 auto;
flex-wrap: wrap;
min-width: 0;
/* two rows of 36px pills, one 8px gap, and room for the focus ring */
max-height: 86px;
overflow: hidden;
padding: 3px 3px;
margin: -3px;
}
.home-tbar[data-expanded] .home-tbar-list {
max-height: none;
overflow: visible;
}
.home-tbar-tail {
align-self: flex-end;
padding-bottom: 0;
}
}
@media (max-width: 767px) {
.home-tbar-tail {
padding-right: 4px;
}
}
@media (prefers-reduced-motion: reduce) {
.home-tbar-chip.is-pending {
animation: none;
opacity: 0.8;
}
}
/* #1416: a switched topic's text fades in under the box flight; with reduced motion the whole card crossfades instead. */
@keyframes home-card-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.home-story-card .home-story-text {
animation: home-card-in 180ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
.home-story-card {
animation: home-card-in 220ms ease-out;
}
.home-story-card .home-story-text {
animation: none;
}
}
@media (prefers-reduced-motion: reduce) {
.home-story-map[data-xfade] {
animation: home-card-in 220ms ease-out;
}
}
|