Skip to content

Conversation

@FabienMotte
Copy link
Contributor

@FabienMotte FabienMotte commented Nov 24, 2025

Summary

This PR:

  • Refactors the Autocomplete component styles to use common CSS variables.
  • Fixes the InstantSearch.css DevTools exports and adds support for new dimensions.
  • Fixes some styles.
  • Disables the dark mode media query for now, until all widgets support dark mode.

Result

image

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 24, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2fe2e6c:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@FabienMotte FabienMotte force-pushed the refactor/unified-css-vars branch from e7c8caf to 1cdf0a5 Compare November 24, 2025 10:09
@FabienMotte FabienMotte marked this pull request as ready for review November 24, 2025 10:27
Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@aymeric-giraudet
Copy link
Member

Colors look a bit lighter than before, I think it may be because Autocomplete was using some arbitrary alpha values before.
Is it possible to make it aligned with what we had before ?
image

image

@FabienMotte
Copy link
Contributor Author

Colors look a bit lighter than before, I think it may be because Autocomplete was using some arbitrary alpha values before.
Is it possible to make it aligned with what we had before ?

@aymeric-giraudet Now it should look more subtle. For the color, I'm using the example header gradient first stop color as the primary color, and using it to mix it with the background color. This way I only need a primary color, whereas in Autocomplete.js, a different color/alpha is used as the selected color.

background-color: color-mix(
  in srgb,
  rgb(var(--ais-primary-color-rgb)) 10%, /* I updated this value */
  rgb(var(--ais-background-color-rgb))
);

WDYT?

image

@FabienMotte
Copy link
Contributor Author

@aymeric-giraudet By the way, I noticed that the autocomplete item's aria-selected attribute is not updated to true on hover, it only changes when the keyboard arrows are used. Is this expected?

@Haroenv
Copy link
Contributor

Haroenv commented Nov 25, 2025

yes, as that's the WAI-ARIA suggestion. The mouse is only only used for clicking and the keyboard for selection.

@FabienMotte
Copy link
Contributor Author

yes, as that's the WAI-ARIA suggestion. The mouse is only only used for clicking and the keyboard for selection.

Makes sense, then I guess Autocomplete.js implem is wrong, aria-selected is updated on hover

@FabienMotte FabienMotte requested a review from Haroenv November 25, 2025 14:41
@FabienMotte FabienMotte merged commit 4f1cabe into master Nov 27, 2025
14 checks passed
@FabienMotte FabienMotte deleted the refactor/unified-css-vars branch November 27, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants