|
19 | 19 | --ifm-link-color: #8885f9; |
20 | 20 | --ifm-link-hover-color: #8885f9; |
21 | 21 | --ifm-link-hover-decoration: underline; |
| 22 | + |
| 23 | + /* Search input colors - light mode default */ |
| 24 | + --ifm-navbar-search-input-background-color: rgba(255, 255, 255, 0.1); |
| 25 | + --ifm-navbar-search-input-color: #ffffff; |
22 | 26 | } |
23 | 27 |
|
24 | 28 | /* For readability concerns, you should choose a lighter palette in dark mode. */ |
@@ -194,3 +198,231 @@ footer.footer .footer__copyright { |
194 | 198 | color: var(--ifm-color-secondary); |
195 | 199 | } |
196 | 200 |
|
| 201 | +/* Local Search Plugin - Aggressive Light Mode Override */ |
| 202 | +html[data-theme='light'] { |
| 203 | + /* Search button in navbar - keep dark to match navbar */ |
| 204 | + --ifm-navbar-search-input-background-color: rgba(255, 255, 255, 0.1) !important; |
| 205 | + --ifm-navbar-search-input-color: #ffffff !important; |
| 206 | + --ifm-navbar-search-input-placeholder-color: rgba(255, 255, 255, 0.6) !important; |
| 207 | + --docsearch-modal-background: #ffffff !important; |
| 208 | + --docsearch-searchbox-background: #ffffff !important; |
| 209 | + --docsearch-text-color: #000000 !important; |
| 210 | +} |
| 211 | + |
| 212 | +html[data-theme='light'] .navbar__search input, |
| 213 | +html[data-theme='light'] .navbar__search input[type="search"], |
| 214 | +html[data-theme='light'] input.navbar__search-input, |
| 215 | +html[data-theme='light'] div[class*="searchBox"] input { |
| 216 | + background-color: rgba(255, 255, 255, 0.1) !important; |
| 217 | + background-image: none !important; |
| 218 | + color: #ffffff !important; |
| 219 | +} |
| 220 | + |
| 221 | +/* Target the exact classes from the plugin with highest specificity */ |
| 222 | +html[data-theme='light'] input.searchInput_T5pz.input_iKql.navbar__search-input, |
| 223 | +html[data-theme='light'] input.searchInput_T5pz.input_iKql, |
| 224 | +html[data-theme='light'] input.searchInput_T5pz, |
| 225 | +html[data-theme='light'] input.input_iKql, |
| 226 | +html[data-theme='light'] .navbar__search-input.searchInput_T5pz, |
| 227 | +html[data-theme='light'] input[role="combobox"] { |
| 228 | + background-color: rgba(255, 255, 255, 0.1) !important; |
| 229 | + background-image: none !important; |
| 230 | + background: rgba(255, 255, 255, 0.1) !important; |
| 231 | + color: #ffffff !important; |
| 232 | +} |
| 233 | + |
| 234 | +/* Not focused state - even more specific */ |
| 235 | +html[data-theme='light'] input.searchInput_T5pz.input_iKql:not(:focus), |
| 236 | +html[data-theme='light'] input[role="combobox"]:not(:focus) { |
| 237 | + background-color: rgba(255, 255, 255, 0.1) !important; |
| 238 | + background: rgba(255, 255, 255, 0.1) !important; |
| 239 | + color: #ffffff !important; |
| 240 | +} |
| 241 | + |
| 242 | +html[data-theme='light'] .navbar__search input:focus, |
| 243 | +html[data-theme='light'] .navbar__search input[type="search"]:focus, |
| 244 | +html[data-theme='light'] input.navbar__search-input:focus { |
| 245 | + background-color: #ffffff !important; |
| 246 | + background-image: none !important; |
| 247 | + color: #000000 !important; |
| 248 | + -webkit-text-fill-color: #000000 !important; |
| 249 | +} |
| 250 | + |
| 251 | +/* Focus states for specific classes */ |
| 252 | +html[data-theme='light'] input.searchInput_T5pz:focus, |
| 253 | +html[data-theme='light'] input.input_iKql:focus, |
| 254 | +html[data-theme='light'] input[role="combobox"]:focus { |
| 255 | + background-color: #ffffff !important; |
| 256 | + background-image: none !important; |
| 257 | + background: #ffffff !important; |
| 258 | + color: #000000 !important; |
| 259 | + -webkit-text-fill-color: #000000 !important; |
| 260 | +} |
| 261 | + |
| 262 | +/* Search input in navbar - ONLY style the container, not when typing */ |
| 263 | +[data-theme='light'] .navbar__search-input:not(:focus) { |
| 264 | + background-color: rgba(255, 255, 255, 0.1) !important; |
| 265 | + color: #ffffff !important; |
| 266 | + border: 1px solid rgba(255, 255, 255, 0.2) !important; |
| 267 | +} |
| 268 | + |
| 269 | +/* When focused/typing - white background with black text */ |
| 270 | +[data-theme='light'] .navbar__search-input:focus, |
| 271 | +[data-theme='light'] .navbar__search-input:active { |
| 272 | + background-color: #ffffff !important; |
| 273 | + color: #000000 !important; |
| 274 | + border: 1px solid #cccccc !important; |
| 275 | + -webkit-text-fill-color: #000000 !important; |
| 276 | +} |
| 277 | + |
| 278 | +/* Force black text when typing */ |
| 279 | +[data-theme='light'] input[type="search"]:focus, |
| 280 | +[data-theme='light'] input[class*="search"]:focus { |
| 281 | + color: #000000 !important; |
| 282 | + -webkit-text-fill-color: #000000 !important; |
| 283 | +} |
| 284 | + |
| 285 | +/* Keep unfocused search input dark */ |
| 286 | +[data-theme='light'] input[type="search"]:not(:focus), |
| 287 | +[data-theme='light'] input[class*="search"]:not(:focus) { |
| 288 | + background-color: rgba(255, 255, 255, 0.1) !important; |
| 289 | + color: #ffffff !important; |
| 290 | +} |
| 291 | + |
| 292 | +[data-theme='light'] .navbar__search-input::placeholder { |
| 293 | + color: rgba(255, 255, 255, 0.6) !important; |
| 294 | +} |
| 295 | + |
| 296 | +[data-theme='light'] .navbar__search-input:focus::placeholder { |
| 297 | + color: #666666 !important; |
| 298 | +} |
| 299 | + |
| 300 | +/* Search input wrapper/container */ |
| 301 | +[data-theme='light'] .navbar__search, |
| 302 | +[data-theme='light'] div[class*="searchBox"] { |
| 303 | + background-color: transparent !important; |
| 304 | +} |
| 305 | + |
| 306 | +/* Force dark background when NOT focused - multiple selectors */ |
| 307 | +[data-theme='light'] .navbar__search input, |
| 308 | +[data-theme='light'] .navbar__search input[type="search"], |
| 309 | +[data-theme='light'] input.navbar__search-input, |
| 310 | +[data-theme='light'] div[class*="searchBox"] input { |
| 311 | + background-color: rgba(255, 255, 255, 0.1) !important; |
| 312 | + background: rgba(255, 255, 255, 0.1) !important; |
| 313 | + color: #ffffff !important; |
| 314 | +} |
| 315 | + |
| 316 | +[data-theme='light'] .navbar__search input:not(:focus), |
| 317 | +[data-theme='light'] .navbar__search input[type="search"]:not(:focus), |
| 318 | +[data-theme='light'] input.navbar__search-input:not(:focus) { |
| 319 | + background-color: rgba(255, 255, 255, 0.1) !important; |
| 320 | + background: rgba(255, 255, 255, 0.1) !important; |
| 321 | + color: #ffffff !important; |
| 322 | +} |
| 323 | + |
| 324 | +/* White background only when focused */ |
| 325 | +[data-theme='light'] .navbar__search input:focus, |
| 326 | +[data-theme='light'] .navbar__search input[type="search"]:focus, |
| 327 | +[data-theme='light'] input.navbar__search-input:focus { |
| 328 | + background-color: #ffffff !important; |
| 329 | + background: #ffffff !important; |
| 330 | + color: #000000 !important; |
| 331 | +} |
| 332 | + |
| 333 | +/* Remove backgrounds from search icon and inner elements */ |
| 334 | +[data-theme='light'] .navbar__search svg, |
| 335 | +[data-theme='light'] .navbar__search button, |
| 336 | +[data-theme='light'] div[class*="searchBox"] svg, |
| 337 | +[data-theme='light'] div[class*="searchBox"] button, |
| 338 | +[data-theme='light'] .navbar__search::before, |
| 339 | +[data-theme='light'] .navbar__search::after { |
| 340 | + background-color: transparent !important; |
| 341 | + background: transparent !important; |
| 342 | +} |
| 343 | + |
| 344 | +[data-theme='light'] .navbar__search .aa-DetachedSearchButton, |
| 345 | +[data-theme='light'] .navbar__search [class*="SearchButton"] { |
| 346 | + background-color: transparent !important; |
| 347 | + background: transparent !important; |
| 348 | +} |
| 349 | + |
| 350 | +/* Target the search icon container specifically */ |
| 351 | +[data-theme='light'] .navbar__search .search-icon, |
| 352 | +[data-theme='light'] .navbar__search [class*="searchIcon"], |
| 353 | +[data-theme='light'] div[class*="searchBox"] > div:first-child, |
| 354 | +[data-theme='light'] .navbar__search-input::before { |
| 355 | + background-color: transparent !important; |
| 356 | + background: transparent !important; |
| 357 | +} |
| 358 | + |
| 359 | +/* Style the search icon itself */ |
| 360 | +[data-theme='light'] .navbar__search svg path, |
| 361 | +[data-theme='light'] div[class*="searchBox"] svg path { |
| 362 | + fill: #ffffff !important; |
| 363 | +} |
| 364 | + |
| 365 | +/* Search popup/modal container */ |
| 366 | +[data-theme='light'] div[class*="searchBarContainer"], |
| 367 | +[data-theme='light'] div[class*="suggestionContainer"], |
| 368 | +[data-theme='light'] .aa-Panel, |
| 369 | +[data-theme='light'] .aa-PanelLayout { |
| 370 | + background-color: #ffffff !important; |
| 371 | + color: #000000 !important; |
| 372 | + border: 1px solid #cccccc !important; |
| 373 | +} |
| 374 | + |
| 375 | +/* All elements inside search results */ |
| 376 | +[data-theme='light'] div[class*="searchBarContainer"] *, |
| 377 | +[data-theme='light'] div[class*="suggestionContainer"] *, |
| 378 | +[data-theme='light'] .aa-Panel *, |
| 379 | +[data-theme='light'] .aa-PanelLayout * { |
| 380 | + color: #000000 !important; |
| 381 | +} |
| 382 | + |
| 383 | +/* Search result items */ |
| 384 | +[data-theme='light'] div[class*="searchResultItem"], |
| 385 | +[data-theme='light'] .aa-Item { |
| 386 | + background-color: #ffffff !important; |
| 387 | + color: #000000 !important; |
| 388 | +} |
| 389 | + |
| 390 | +[data-theme='light'] div[class*="searchResultItem"]:hover, |
| 391 | +[data-theme='light'] .aa-Item:hover, |
| 392 | +[data-theme='light'] .aa-Item[aria-selected="true"] { |
| 393 | + background-color: #f5f5f5 !important; |
| 394 | +} |
| 395 | + |
| 396 | +/* Highlighted text */ |
| 397 | +[data-theme='light'] mark, |
| 398 | +[data-theme='light'] .aa-ItemContentTitle mark, |
| 399 | +[data-theme='light'] div[class*="searchResultItem"] mark { |
| 400 | + background-color: #ffeb3b !important; |
| 401 | + color: #000000 !important; |
| 402 | + padding: 0 2px; |
| 403 | +} |
| 404 | + |
| 405 | +/* Warning message */ |
| 406 | +[data-theme='light'] div[class*="noResultsScreen"], |
| 407 | +[data-theme='light'] .aa-DetachedOverlay { |
| 408 | + background-color: #ffffff !important; |
| 409 | + color: #000000 !important; |
| 410 | +} |
| 411 | + |
| 412 | +/* Dark mode - ensure consistency */ |
| 413 | +[data-theme='dark'] .navbar__search-input { |
| 414 | + background-color: #2d2d2d !important; |
| 415 | + color: #ffffff !important; |
| 416 | +} |
| 417 | + |
| 418 | +[data-theme='dark'] div[class*="searchBarContainer"], |
| 419 | +[data-theme='dark'] div[class*="suggestionContainer"] { |
| 420 | + background-color: #2d2d2d !important; |
| 421 | + color: #ffffff !important; |
| 422 | +} |
| 423 | + |
| 424 | +[data-theme='dark'] mark { |
| 425 | + background-color: #8885f9 !important; |
| 426 | + color: #ffffff !important; |
| 427 | +} |
| 428 | + |
0 commit comments