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

fix(gatsby-theme-blog): Trigger link icon beside Heading on hover #16656

Conversation

NickyMeuleman
Copy link
Contributor

@NickyMeuleman NickyMeuleman commented Aug 15, 2019

Description & motivation

Hovering over where the link icon would be now triggers showing it.
This brings the behaviour more in line with gatsby-remark-autolink-headers.

Mouse users often don't hover over the text of a header first to click the link.
I know this is a very minor change, but it relieves a minor inconvenience of the icon not showing up when you expect it to.

If not set pointer-events defaults to auto, which is the same as visiblePainted.
This sets pointer-events to painted instead, allowing pointer events even when the visibility is set to hidden

Before

You had to hover over the text first, then move the mouse to the left to click the icon.
qUkhkMRBfy

After

Hovering to the left of the heading also shows the link icon.
0PlRy9nNig

@NickyMeuleman NickyMeuleman requested a review from a team as a code owner August 15, 2019 15:39
Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

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

Love this little but incredibly useful fix! Thanks for making gatsby-theme-blog better, Nicky! 💜

@sidharthachatterjee sidharthachatterjee changed the title [theme-blog] hover over heading triggers link icon fix(gatsby-theme-blog): Trigger link icon beside Heading on hover Aug 15, 2019
@sidharthachatterjee sidharthachatterjee merged commit 93e765b into gatsbyjs:master Aug 15, 2019
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.

2 participants