-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Customize the cursor of clear button shown on non-empty search inputs #41577
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
base: main
Are you sure you want to change the base?
Conversation
This change adds the `cursor: pointer` style to the native `::-webkit-search-cancel-button` pseudo-element to improve user experience on WebKit/Blink-based browsers. Closes: twbs#39114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feature request and its implementation in this PR, @DenisLopatin.
Personally, I’m fine with the change as it improves rendering in Chrome (and likely other browsers supporting this selector).

For other reviewers: I’m never quite sure where the line is between adding something to _reboot.scss
versus placing it directly in the relevant component(s). In this case, I’m still a bit uncertain.
Also, for reviewers, please double-check whether this rule should be wrapped in $enable-button-pointers
. As I understand it, that setting mainly applies to "real" buttons.
Hi! Yes, we can wrap this in the
In that case, the cursor for the form's clear button will also be disabled, but the problem is that this variable is intended only for buttons, and the Maybe:
This is work too |
Apologies, I edited the final sentence in my previous message; it was intended for the core team as well. 🙏 |
In this case, I think we want to move it to Reboot if we want it—it's a change to browser defaults that's not unique to our other design changes and stuff. Thoughts? |
No problem on my end. We can move it to Reboot as it's not specific to Bootstrap. |
This change adds the
cursor: pointer
style to the native::-webkit-search-cancel-button
pseudo-element to improve user experience on WebKit/Blink-based browsers.Closes: #39114
Description
This change introduces a CSS rule to apply
cursor: pointer
to the native clear button (::-webkit-search-cancel-button
) found in<input type="search">
elements. A comment has been added to clarify that this enhancement only affects WebKit/Blink-based browsers and does not apply to Firefox (Gecko).Motivation & Context
Currently, the native clear button in search inputs lacks a pointer cursor, which can make it feel less interactive than other clickable elements on a page. This change improves user experience by providing standard visual feedback that the element is clickable, aligning its behavior with that of other buttons and links. This resolves the issue described in #39114.
Type of changes
Checklist
npm run lint
)Live previews
Related issues
None.