mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
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@media (prefers-color-scheme: dark) { 20 :root { 21 color-scheme: dark; 22 --text: white; 23 --background: black; 24 --backgroundLight: hsl(211, 20%, 20%); 25 } 26} 27 28html.theme--light { 29 --text: black; 30 --background: white; 31 --backgroundLight: hsl(211, 20%, 95%); 32 background-color: white; 33} 34html.theme--dark { 35 color-scheme: dark; 36 background-color: black; 37 --text: white; 38 --background: black; 39 --backgroundLight: hsl(211, 20%, 20%); 40} 41html.theme--dim { 42 color-scheme: dark; 43 background-color: hsl(211, 28%, 12%); 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/* Force left-align date/time inputs on iOS mobile */ 71input::-webkit-date-and-time-value { 72 text-align: left; 73} 74 75/* Remove default link styling */ 76a { 77 color: inherit; 78} 79a[role='link']:hover { 80 text-decoration: underline; 81} 82a[role='link'][data-no-underline='1']:hover { 83 text-decoration: none; 84} 85 86/* Styling hacks */ 87*[data-word-wrap] { 88 word-break: break-word; 89} 90*[data-stable-gutters] { 91 scrollbar-gutter: stable both-edges; 92} 93 94/* ProseMirror */ 95.ProseMirror { 96 min-height: inherit; 97} 98.ProseMirror-dark { 99 color: white; 100} 101.ProseMirror p { 102 margin: 0; 103} 104.ProseMirror p.is-editor-empty:first-child::before { 105 color: #8d8e96; 106 content: attr(data-placeholder); 107 float: left; 108 height: 0; 109 pointer-events: none; 110} 111.ProseMirror .mention { 112 color: #0085ff; 113} 114.ProseMirror a, 115.ProseMirror .autolink { 116 color: #0085ff; 117} 118/* OLLIE: TODO -- this is not accessible */ 119/* Remove focus state on inputs */ 120.ProseMirror-focused { 121 outline: 0; 122} 123textarea:focus, 124input:focus { 125 outline: 0; 126} 127.tippy-content .items { 128 width: fit-content; 129} 130 131/* Tooltips */ 132[data-tooltip] { 133 position: relative; 134 z-index: 10; 135} 136[data-tooltip]::after { 137 content: attr(data-tooltip); 138 display: none; 139 position: absolute; 140 bottom: 0; 141 left: 50%; 142 transform: translateY(100%) translateY(8px) translateX(-50%); 143 padding: 4px 10px; 144 border-radius: 10px; 145 background: var(--backgroundLight); 146 color: var(--text); 147 text-align: center; 148 white-space: nowrap; 149 font-size: 12px; 150 z-index: 10; 151} 152[data-tooltip]::before { 153 content: ''; 154 display: none; 155 position: absolute; 156 border-bottom: 6px solid var(--backgroundLight); 157 border-left: 6px solid transparent; 158 border-right: 6px solid transparent; 159 bottom: 0; 160 left: 50%; 161 transform: translateY(100%) translateY(2px) translateX(-50%); 162 z-index: 10; 163} 164[data-tooltip]:hover::after, 165[data-tooltip]:hover::before { 166 display: block; 167} 168 169/* NativeDropdown component */ 170.radix-dropdown-item:focus, 171.nativeDropdown-item:focus { 172 outline: none; 173} 174 175/* Spinner component */ 176@keyframes rotate { 177 0% { 178 transform: rotate(0deg); 179 } 180 100% { 181 transform: rotate(360deg); 182 } 183} 184.rotate-500ms { 185 position: absolute; 186 inset: 0; 187 animation: rotate 500ms linear infinite; 188} 189 190/* animations for atoms */ 191@keyframes fadeIn { 192 from { 193 opacity: 0; 194 } 195 to { 196 opacity: 1; 197 } 198} 199 200@keyframes fadeOut { 201 from { 202 opacity: 1; 203 } 204 to { 205 opacity: 0; 206 } 207} 208 209@keyframes zoomIn { 210 from { 211 transform: scale(0.95); 212 } 213 to { 214 transform: scale(1); 215 } 216} 217 218@keyframes slideInLeft { 219 from { 220 transform: translateX(-100%); 221 } 222 to { 223 transform: translateX(0); 224 } 225} 226 227@keyframes slideOutLeft { 228 from { 229 transform: translateX(0); 230 } 231 to { 232 transform: translateX(-100%); 233 } 234} 235 236/* animating radix dropdowns requires knowing the data attributes */ 237.dropdown-menu-transform-origin > * { 238 transform-origin: var(--radix-dropdown-menu-content-transform-origin); 239} 240.dropdown-menu-constrain-size > * { 241 max-height: var(--radix-dropdown-menu-content-available-height); 242} 243 244.force-no-clicks > *, 245.force-no-clicks * { 246 pointer-events: none !important; 247} 248 249input[type='range'][orient='vertical'] { 250 writing-mode: vertical-lr; 251 direction: rtl; 252 appearance: slider-vertical; 253 width: 16px; 254 vertical-align: bottom; 255 -webkit-appearance: none; 256 appearance: none; 257 background: transparent; 258 cursor: pointer; 259} 260 261input[type='range'][orient='vertical']::-webkit-slider-runnable-track { 262 background: white; 263 height: 100%; 264 width: 4px; 265 border-radius: 4px; 266} 267 268input[type='range'][orient='vertical']::-moz-range-track { 269 background: white; 270 height: 100%; 271 width: 4px; 272 border-radius: 4px; 273} 274 275input[type='range']::-webkit-slider-thumb { 276 -webkit-appearance: none; 277 appearance: none; 278 border-radius: 50%; 279 background-color: white; 280 height: 16px; 281 width: 16px; 282 margin-left: -6px; 283} 284 285input[type='range'][orient='vertical']::-moz-range-thumb { 286 border: none; 287 border-radius: 50%; 288 background-color: white; 289 height: 16px; 290 width: 16px; 291 margin-left: -6px; 292}