question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Black hover over list item with checkbox

See original GitHub issue

What MDC Web Version are you using?

1.1.1

What browser(s) is this bug affecting?

Chrome (Chromium) 74.0.3729.61

What OS are you using?

Ubuntu 18.04

What are the steps to reproduce the bug?

  1. Go to CodePen with Chrome 74+
  2. Hover over items
  3. You can see the black hover style

What is the expected behavior?

The background should be transparent.

What is the actual behavior?

The background is black.

Screenshot from 2019-04-22 00-01-13

Any other information you believe would be useful?

This issue only happens on Chrome 74+. I’m not sure if it’s a bug in Chrome 74+ or not since it’s still in beta, but removing the z-index from this selector fixes the problem:

:not(.mdc-list--non-interactive)>:not(.mdc-list-item--disabled).mdc-list-item::before {
    transition: opacity 15ms linear,background-color 15ms linear;
    z-index: 1;
}

removing “will-change” in this selector fixes this issue too:

:not(.mdc-list--non-interactive)>:not(.mdc-list-item--disabled).mdc-list-item {
    cursor: pointer;
    --mdc-ripple-fg-size: 0;
    --mdc-ripple-left: 0;
    --mdc-ripple-top: 0;
    --mdc-ripple-fg-scale: 1;
    --mdc-ripple-fg-translate-end: 0;
    --mdc-ripple-fg-translate-start: 0;
    -webkit-tap-highlight-color: transparent;
    will-change: transform,opacity;

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
MarcosRakeshcommented, Apr 24, 2019

@moog16 v74 is released and i can reproduce too now, was fine before updating.

3reactions
jamesmfriedmancommented, May 8, 2019

Linking https://github.com/jamesmfriedman/rmwc/issues/458

I did some more poking around to. To confirm some things

  • This is an issue that is ONLY affecting Chrome 74. Chrome 73 and below work fine, Edge, Safari, and Firefox are all fine.
  • This doesn’t affect all of the places where css vars are used. The only cases I can reproduce are instances where a checkbox is a child.
  • Doing ANYTHING that throws the element in question onto the gpu rendering context fixes the issue. Not a great fix, but a temporary solution. The above example of filter does this, as well as transform: translateZ(0) on the :before element where the ripple opacity is declared.

Hope this helps!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make checkbox visible when hover or select the ...
It only becomes visible when hovered over again. The solution to the problem is simple. We can use the opacity property of the...
Read more >
Hover with checkbox hack - Stack Overflow
Is there any way to create a hover function so that it shows "Click here to reserve" when the box is green and...
Read more >
The "Checkbox Hack" (and things you can do with it)
Using a hidden checkbox, you can re-create a lot of functionality on website that rely on clicks and toggled states.
Read more >
How To Display Text when a Checkbox is Checked - W3Schools
Display some text when the checkbox is checked: Checkbox: Checkbox is CHECKED! Check Whether a Checkbox is Checked. Step 1) Add HTML: Example....
Read more >
Handling Hover, Focus, and Other States - Tailwind CSS
Using utilities to style elements on hover, focus, and more. ... See the pseudo-class reference for a complete list of available pseudo-class modifiers....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found