-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Remove cursor: pointer;
#21812
Remove cursor: pointer;
#21812
Conversation
what's the issue with iOS clickability? seems that a vanilla element is tappable as long as it has a click handler (and event delegation should work fine as well, see https://patrickhlauke.github.io/getting-touchy-presentation/#220) |
Random test https://jsbin.com/zarituwaba/ works fine for me on iOS |
Guess there isn't an issue then. 😆 I was just going by the code comment there. I'll happily remove the last reference there if it indeed isn't needed. |
* commit 'cfb25f6995160d1ba03da23c3a01446844f45fec': Add aria-label to docs search field Remove random cursor: default from pill nav (twbs#21835) Allow button toolbars to wrap (twbs#21826) fixes twbs#21567 grunt (fixes twbs#21819) Add align self to navbar brand (twbs#21626) Rename order utilities to intended class names (twbs#21739) Pixel perfect navbar toggler (twbs#21821) Update _custom.scss imports in other builds (twbs#21825) Allow flex-based navs to wrap like they used to (twbs#21824) Remove `cursor: pointer;` (twbs#21812)
* bootstrap/v4-dev: (979 commits) Add aria-label to docs search field Remove random cursor: default from pill nav (twbs#21835) Allow button toolbars to wrap (twbs#21826) fixes twbs#21567 grunt (fixes twbs#21819) Add align self to navbar brand (twbs#21626) Rename order utilities to intended class names (twbs#21739) Pixel perfect navbar toggler (twbs#21821) Update _custom.scss imports in other builds (twbs#21825) Allow flex-based navs to wrap like they used to (twbs#21824) Remove `cursor: pointer;` (twbs#21812) Fix body padding in Dashboard and Jumbotron examples. Move htmllint to npm script. Change to markdown (twbs#21815) Change header to use markdown (twbs#21809) Update grid layout docs (twbs#21806) grunt Drop Normalize, port relevant parts to Reboot (twbs#21741) grunt Fix container within navbar on smallest breakpoint (twbs#21722) ...
* bootstrap/v4-dev: (979 commits) Add aria-label to docs search field Remove random cursor: default from pill nav (twbs#21835) Allow button toolbars to wrap (twbs#21826) fixes twbs#21567 grunt (fixes twbs#21819) Add align self to navbar brand (twbs#21626) Rename order utilities to intended class names (twbs#21739) Pixel perfect navbar toggler (twbs#21821) Update _custom.scss imports in other builds (twbs#21825) Allow flex-based navs to wrap like they used to (twbs#21824) Remove `cursor: pointer;` (twbs#21812) Fix body padding in Dashboard and Jumbotron examples. Move htmllint to npm script. Change to markdown (twbs#21815) Change header to use markdown (twbs#21809) Update grid layout docs (twbs#21806) grunt Drop Normalize, port relevant parts to Reboot (twbs#21741) grunt Fix container within navbar on smallest breakpoint (twbs#21722) ...
@mdo I think button hover should retain P.S. Keep up the great work on Bootstrap <3 |
@ryanburnett and this PR does not remove the hand cursor for links styled visually as buttons. it simply removes other situations where |
links and buttons (actual buttons that action an in-page change, submit a form, or similar) are different beasts though. the examples you have from apple, microsoft and w3 actually go directly against the W3C and Apple HIG, as they're also forcing |
if designers/developers do want to have |
In my opinion this change it a bit confusing, I have some controls in my application that use the I preferred the old way of "normalizing" the button styles regardless of whether they are a Luckily it's only one line of code to change the behavior back to old but it would be nice if it worked out of the box. |
I don't get it. I don't care what the specs say I don't think there its "indicating better" when I hover over a button and nothing happens. If there were different cursors for buttons and links this would be a different, this way just nothing happens for buttons so for transparent buttons or whatever that is not changes their styles on hover there is no indication at all, end even with style changes I think a cursor indication is always useful, also for accessibility ... |
maybe this would be better made into a variable, so users could toggle it on and off based on personal preference? |
If you want .btn {
cursor: pointer;
} Yes, this PR caused unexpected changes, but I agree that it's better to stick to the W3C guidelines by default, especially when it's so trivial for developers to override it. |
This change defies logic. You're conforming to spec for the sake of conforming to spec, not because it actually serves a constructive purpose. The irony in all of this is that the specs and guidelines aren't even followed by the groups giving them... W3C's own website styles buttons to have a pointer. A mass majority of your users will overwrite this style. Is it easy? Sure, but that's completely irrelevant. Why make a change that 99% of your users will be forced to overwrite. Worse yet, the small fraction of people who don't will actually provide a worse UX to their users in terms of usability. Guess which one has a more adverse impact? A user hovering over a button and seeing the cursor change (i.e. pretty much what every computer user has been conditioned to expect for the past decade).
A user hovering over a button, not seeing the cursor change, and then wondering if it's disabled, not clickable, etc. The latter is a much worse UX. When a spec breaks basic user expectations, the spec is wrong. If W3C comes out tomorrow and states all buttons must be blue, will Bootstrap conform to that too? I understand the importance of standards and trying to follow specs as closely as possible, but at some point basic logic and reasoning have to come into play. When there literally isn't a single constructive reason to make this change other than W3C says the pointer means a link, the change shouldn't be made. Users don't see a pointer and think, "Oh, this must be an anchor element that I can click to take me to another page," they think, "I can click or otherwise interact with this." This isn't a constructive change. |
Totally agree, fun fact is the issue he thought this fixed #21781 but that was reopened because this actually fixed nothing. Just makes horrible UX. But I have to say I checked w3.org and their search button has in fact no pointer style on hover. Maybe somewhere else on the site but it would be too funny if they would actually have button {
cursor: pointer;
} in their stylesheet. |
They actually have exactly that (well, almost, they use a class called button instead of applying it to the element itself) :p https://www.w3.org/2008/site/css/minimum Check out the button class that they subsequently apply to the top navbar / main "Go" in the top right on their website. |
are button-looking elements (e.g. |
@panva alpha.6 is older than this PR (which targets the first beta). explicit setting of |
@patrickhlauke that's good news! way better than stripping it, thanks for the insight. |
What's indicator (visual feedback for user) that element is clickable, e.g. any icon on the screen (difference between clickable icon and static background image / standard image)? |
Both buttons and anchors have hover styling, making it clear that they're
interactive.
…On Mon, Jun 5, 2017, 4:10 PM Matej Lednár ***@***.***> wrote:
What's indicator (visual feedback for user) that element is clickable,
e.g. any icon on the screen (difference between clickable icon and static
background image / standard image)?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#21812 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGE0Tr01bTI4L7T5F0w1bqLMHjMibLyqks5sBGDPgaJpZM4Lqeib>
.
|
Hamburger icon is SVG. There si no way how to change color via CSS. I tried to change stroke color and use encodingURI for correct string format but stroke color was always removed, don't know why. |
I would like to suggest that the pointer be retained on buttons that are styled and behave as links, for example |
I think that 'cursor: pointer' should be an utility because we use it a lot in differents elements, so I've opened an issue (#23709). |
@mdo links and quotes from first comment seem to be related to desktop applications (except w3c, see UPD2). MSDN and apple.com use UPD. Having buttons with default cursor is confusing in forms like: <button class='btn btn-primary' type='submit'>Save</button>
<a class='btn btn-secondary' href='/back'>Cancel</a> UPD2. https://www.w3.org/ has UPD3. Comparing to desktop apps, I think the main difference is that web-page contains mostly static content (not-interactive) but desktop app usually almost totally interactive. So it has become usual to use pointer cursor to help users distinguish interactive elements on webpages. Especially with custom-styled inputs. Because of this I prefer to add UPD4. I think |
Turns out using
cursor: pointer
on actions (e.g., buttons) is incorrect. I removed thecursor: pointer
from our buttons in Alpha 6 knowing this, but I left the rest of the properties throughout the codebase for another time. This PR aims to finish that work, removing nearly all the remainingcursor: pointer
properties from our CSS.I still need to figure out the
role="button"
one for iOS click-ability though.This would also fix #21781.
References
From the W3C spec:
From Microsoft's design guidelines:
Regarding the cursor pointer from Apple's HIG: