Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: toggle refinement styling #6596

Open
wants to merge 3 commits into
base: feat/algoliacss
Choose a base branch
from

Conversation

thomasbritton
Copy link
Contributor

Screenshot 2025-02-28 at 18 40 52
Screenshot 2025-02-28 at 18 40 46
Screenshot 2025-02-28 at 18 40 36
Screenshot 2025-02-28 at 18 40 32

(cherry picked from commit 11709a6)
Copy link

codesandbox-ci bot commented Feb 28, 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 7a24815:

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

Comment on lines +2 to +3
font-size: 0.875rem;
line-height: 1.75rem;
Copy link
Member

Choose a reason for hiding this comment

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

Any reason to add this? I think we don't need to be opinionated here.

.ais-ToggleRefinement-label {
font-size: 0.875rem;
line-height: 1.75rem;
display: block;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
display: block;

This is overridden in l. 9.

display: flex;
}

input[class^='ais-'][class*='ToggleRefinement-checkbox'] {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure why we need such selector, why not target .ais-ToggleRefinement-checkbox?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because there is a selector in common.css that is of higher specificity input[class^='ais-'][type='checkbox']:checked { /* ... */ }

I did it this way because we were out of time so just needed something quick that would work but the class above probably needs to be merged into the refinement-list.css

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.

3 participants