An ATproto social media client -- with an independent Appview.
at main 7.7 kB view raw
1/** 2 * IMPORTANT 3 * 4 * Some of these styles are duplicated in the `web/index.html` and 5 * `bskyweb/templates/base.html` files. Depending on what you're updating, you 6 * may need to touch all three. Ask Eric if you aren't sure. 7 */ 8 9/** 10 * BEGIN STYLES 11 * 12 * HTML & BODY STYLES IN `web/index.html` and `bskyweb/templates/base.html` 13 */ 14:root { 15 --text: black; 16 --background: white; 17 --backgroundLight: hsl(211, 20%, 95%); 18} 19 20@media (prefers-color-scheme: dark) { 21 :root { 22 color-scheme: dark; 23 --text: white; 24 --background: black; 25 --backgroundLight: hsl(211, 20%, 20%); 26 } 27} 28 29html.theme--light { 30 --text: black; 31 --background: white; 32 --backgroundLight: hsl(211, 20%, 95%); 33} 34 35html.theme--dark { 36 color-scheme: dark; 37 --text: white; 38 --background: black; 39 --backgroundLight: hsl(211, 20%, 20%); 40} 41 42html.theme--dim { 43 color-scheme: dark; 44 --text: white; 45 --background: hsl(211, 20%, 4%); 46 --backgroundLight: hsl(211, 20%, 10%); 47} 48 49/* Buttons and inputs have a font set by UA, so we'll have to reset that */ 50button, 51input, 52textarea { 53 font: inherit; 54 line-height: inherit; 55} 56 57/* Remove autofill styles on Webkit */ 58input:autofill, 59input:-webkit-autofill, 60input:-webkit-autofill:hover, 61input:-webkit-autofill:focus, 62input:-webkit-autofill:active { 63 -webkit-background-clip: text; 64 -webkit-text-fill-color: var(--text); 65 transition: background-color 5000s ease-in-out 0s; 66 box-shadow: inset 0 0 20px 20px var(--background); 67 background: var(--background); 68 color: var(--text); 69} 70 71/* Force left-align date/time inputs on iOS mobile */ 72input::-webkit-date-and-time-value { 73 text-align: left; 74} 75 76/* Remove default link styling */ 77a { 78 color: inherit; 79} 80 81a[role='link']:hover { 82 text-decoration: underline; 83} 84 85a[role='link'][data-no-underline='1']:hover { 86 text-decoration: none; 87} 88 89/* Styling hacks */ 90*[data-word-wrap] { 91 word-break: break-word; 92} 93 94*[data-stable-gutters] { 95 scrollbar-gutter: stable both-edges; 96} 97 98/* ProseMirror */ 99.ProseMirror { 100 min-height: inherit; 101} 102 103.ProseMirror-dark { 104 color: white; 105} 106 107.ProseMirror p { 108 margin: 0; 109} 110 111.ProseMirror p.is-editor-empty:first-child::before { 112 color: #8d8e96; 113 content: attr(data-placeholder); 114 float: left; 115 height: 0; 116 pointer-events: none; 117} 118 119.ProseMirror .mention { 120 color: #0085ff; 121} 122 123.ProseMirror a, 124.ProseMirror .autolink { 125 color: #0085ff; 126} 127 128/* OLLIE: TODO -- this is not accessible */ 129/* Remove focus state on inputs */ 130.ProseMirror-focused { 131 outline: 0; 132} 133 134textarea:focus, 135input:focus { 136 outline: 0; 137} 138 139.tippy-content .items { 140 width: fit-content; 141} 142 143/* Tooltips */ 144[data-tooltip] { 145 position: relative; 146 z-index: 10; 147} 148 149[data-tooltip]::after { 150 content: attr(data-tooltip); 151 display: none; 152 position: absolute; 153 bottom: 0; 154 left: 50%; 155 transform: translateY(100%) translateY(8px) translateX(-50%); 156 padding: 4px 10px; 157 border-radius: 10px; 158 background: var(--backgroundLight); 159 color: var(--text); 160 text-align: center; 161 white-space: nowrap; 162 font-size: 12px; 163 z-index: 10; 164} 165 166[data-tooltip]::before { 167 content: ''; 168 display: none; 169 position: absolute; 170 border-bottom: 6px solid var(--backgroundLight); 171 border-left: 6px solid transparent; 172 border-right: 6px solid transparent; 173 bottom: 0; 174 left: 50%; 175 transform: translateY(100%) translateY(2px) translateX(-50%); 176 z-index: 10; 177} 178 179[data-tooltip]:hover::after, 180[data-tooltip]:hover::before { 181 display: block; 182} 183 184/* NativeDropdown component */ 185.radix-dropdown-item:focus, 186.nativeDropdown-item:focus { 187 outline: none; 188} 189 190/* Spinner component */ 191@keyframes rotate { 192 0% { 193 transform: rotate(0deg); 194 } 195 196 100% { 197 transform: rotate(360deg); 198 } 199} 200 201.rotate-500ms { 202 position: absolute; 203 inset: 0; 204 animation: rotate 500ms linear infinite; 205} 206 207/* animations for atoms */ 208@keyframes fadeIn { 209 from { 210 opacity: 0; 211 } 212 213 to { 214 opacity: 1; 215 } 216} 217 218@keyframes fadeOut { 219 from { 220 opacity: 1; 221 } 222 223 to { 224 opacity: 0; 225 } 226} 227 228@keyframes zoomIn { 229 from { 230 transform: scale(0.95); 231 } 232 233 to { 234 transform: scale(1); 235 } 236} 237 238@keyframes slideInLeft { 239 from { 240 transform: translateX(-100%); 241 } 242 243 to { 244 transform: translateX(0); 245 } 246} 247 248@keyframes slideOutLeft { 249 from { 250 transform: translateX(0); 251 } 252 253 to { 254 transform: translateX(-100%); 255 } 256} 257 258/* animating radix dropdowns requires knowing the data attributes */ 259.dropdown-menu-transform-origin > * { 260 transform-origin: var(--radix-dropdown-menu-content-transform-origin); 261} 262 263.dropdown-menu-constrain-size > * { 264 max-height: var(--radix-dropdown-menu-content-available-height); 265} 266 267.force-no-clicks > *, 268.force-no-clicks * { 269 pointer-events: none !important; 270} 271 272input[type='range'][orient='vertical'] { 273 writing-mode: vertical-lr; 274 direction: rtl; 275 appearance: slider-vertical; 276 width: 16px; 277 vertical-align: bottom; 278 -webkit-appearance: none; 279 appearance: none; 280 background: transparent; 281 cursor: pointer; 282} 283 284input[type='range'][orient='vertical']::-webkit-slider-runnable-track { 285 background: white; 286 height: 100%; 287 width: 4px; 288 border-radius: 4px; 289} 290 291input[type='range'][orient='vertical']::-moz-range-track { 292 background: white; 293 height: 100%; 294 width: 4px; 295 border-radius: 4px; 296} 297 298input[type='range']::-webkit-slider-thumb { 299 -webkit-appearance: none; 300 appearance: none; 301 border-radius: 50%; 302 background-color: white; 303 height: 16px; 304 width: 16px; 305 margin-left: -6px; 306} 307 308input[type='range'][orient='vertical']::-moz-range-thumb { 309 border: none; 310 border-radius: 50%; 311 background-color: white; 312 height: 16px; 313 width: 16px; 314 margin-left: -6px; 315} 316 317/* 318 * EmojiReactionPicker dropdown elements, within Radix components 319 */ 320.EmojiReactionPicker__Pressable { 321 cursor: pointer; 322 border: 1px solid transparent; 323} 324 325.EmojiReactionPicker__Pressable:focus { 326 outline: none; 327 border-color: var(--text); 328} 329 330.EmojiReactionPicker__Pressable:hover { 331 outline: none; 332 transform: scale(1.1); 333 border-color: transparent; 334} 335 336.EmojiReactionPicker__Pressable:not(.__selected).__disabled { 337 transform: scale(1) !important; 338 border-color: transparent !important; 339 opacity: 0.7; 340} 341 342.EmojiReactionPicker__Pressable ~ button { 343 cursor: pointer; 344 border: 1px solid transparent; 345} 346 347.EmojiReactionPicker__Pressable ~ button:focus { 348 outline: none; 349 border-color: var(--text); 350} 351 352.EmojiReactionPicker__Pressable ~ button:hover { 353 outline: none; 354 background-color: var(--backgroundLight); 355 border-color: transparent; 356} 357 358/* #/components/Select/index.web.tsx */ 359.radix-select-content { 360 box-shadow: 361 0px 6px 24px -10px rgba(22, 23, 24, 0.25), 362 0px 6px 12px -12px rgba(22, 23, 24, 0.15); 363 min-width: var(--radix-select-trigger-width); 364 max-height: var(--radix-select-content-available-height); 365} 366 367/* 368 * #/components/Tooltip/index.web.tsx 369 */ 370.radix-popover-content { 371 animation-duration: 300ms; 372 animation-timing-function: cubic-bezier(0.17, 0.73, 0.14, 1); 373 will-change: transform, opacity; 374} 375 376.radix-popover-content[data-state='open'][data-side='top'] { 377 animation-name: radixPopoverSlideUpAndFade; 378} 379 380.radix-popover-content[data-state='open'][data-side='bottom'] { 381 animation-name: radixPopoverSlideDownAndFade; 382} 383 384@keyframes radixPopoverSlideUpAndFade { 385 from { 386 opacity: 0; 387 transform: translateY(2px); 388 } 389 390 to { 391 opacity: 1; 392 transform: translateY(0); 393 } 394} 395 396@keyframes radixPopoverSlideDownAndFade { 397 from { 398 opacity: 0; 399 transform: translateY(-2px); 400 } 401 402 to { 403 opacity: 1; 404 transform: translateY(0); 405 } 406} 407 408/* 409 * #/components/Toast/index.web.tsx 410 */ 411@keyframes toastFadeIn { 412 from { 413 opacity: 0; 414 } 415 416 to { 417 opacity: 1; 418 } 419} 420 421@keyframes toastFadeOut { 422 from { 423 opacity: 1; 424 } 425 426 to { 427 opacity: 0; 428 } 429}