Customize the cursor of clear button shown on non-empty search inputs#41577
Customize the cursor of clear button shown on non-empty search inputs#41577DenisLopatin wants to merge 3 commits intotwbs:mainfrom
Conversation
There was a problem hiding this comment.
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. |
|
Hi! To switch to reboot mode, is it to do what I suggested in the post above? Optional activation? |
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
d8cac6e to
158407c
Compare
- create variable $enable-search-clear-pointer as false default - move cursor: pointer to _reboot.scss Closes: twbs#39114
|
See #41639. |
This change adds the
cursor: pointerstyle to the native::-webkit-search-cancel-buttonpseudo-element to improve user experience on WebKit/Blink-based browsers.Closes: #39114
Description
This change introduces a CSS rule to apply
cursor: pointerto 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.