refactor(theme): split autocomplete CSS into functional area files#91
Merged
sarahdayan merged 5 commits intomainfrom Mar 19, 2026
Merged
refactor(theme): split autocomplete CSS into functional area files#91sarahdayan merged 5 commits intomainfrom
sarahdayan merged 5 commits intomainfrom
Conversation
Add per-source noResults templates for indices and showQuerySuggestions,
and a global noResults empty state with search icon, title (with
{{query}} interpolation), description, and clear query button.
The global noResults panel is fully themeable via dedicated CSS variables
(26 variables covering layout, colors, typography, and button styling),
defined in each preset with values matching their design language.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Integrate main's detachedMediaQuery param and z-index theme variable alongside this branch's noResults template support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split the monolithic autocomplete.css (825 lines) into 8 focused files under css/: root, form, input, panel, sources, items, no-results, and detached. The main file now only contains @import declarations. Add a readCssWithImports() helper in the runtime build config to resolve @import statements at build time, since the CSS is inlined via readFileSync. Add sync tests to ensure CSS variables, AUTOCOMPLETE_VARIABLES declarations, and preset keys stay in sync. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…plete-panel-gap variables These variables were declared in AUTOCOMPLETE_VARIABLES and overridden in presets but never referenced in any CSS file, making them dead code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for algolia-experiences-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for algolia-experiences-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
autocomplete.cssfocused files undercss/readCssWithImports()helper in the runtime build config to resolve@importstatements at build timeAUTOCOMPLETE_VARIABLESdeclarations, and preset keys stay in syncautocomplete-font-weight-mediumandautocomplete-panel-gap(declared and preset-overridden but never referenced in CSS)