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

[Chrome] Cursor is not consistent when hovering button's icon #3346

Closed
oleq opened this issue Sep 19, 2016 · 3 comments · Fixed by ckeditor/ckeditor5-theme-lark#61
Closed
Assignees

Comments

@oleq
Copy link
Member

oleq commented Sep 19, 2016

button-icon-cursor

To deal with it, either a <styles> declaration must be injected into SVG, which is not an option here because not every element using an icon from the sprite should have cursor: pointer, or hack it a little bit, like this

    .ck-button:before {
        content: "";
        display: block;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        cursor: pointer;
    }

The hack works but, TBH, I don't like it.

BTW: We're not alone http://stackoverflow.com/questions/26672936/cursor-pointer-on-svg-element-is-not-working.

@oleq
Copy link
Member Author

oleq commented Sep 19, 2016

And no, setting cursor: pointer to <svg>, <use> or .ck-button * does not help. What goes inside SVG's XML tree seems to be out of control. At least in Chrome, because Firefox seems to be OK.

@fredck
Copy link
Contributor

fredck commented Sep 19, 2016

I don't feel that pointer is the right thing for UI buttons... it should be default.

@oleq
Copy link
Member Author

oleq commented Sep 19, 2016

That's a good point. Given that the spec is quite clear what is the purpose of cursor: pointer

pointer The cursor is a pointer that indicates a link.

and this great comment I stumbled upon also explains a lot, I'm willing to stick to the spec.

However note that if you navigate GitHub, all buttons change the cursor to the "pointer" style and people might be used to it.

Standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants