Adding content to gutter on mouseover

Hi, I am porting a codebase to codemirror 6 and I followed the Gutter example for adding breakpoints. Now I would like to see a 50% opaque breakpoint when the mouse is over the breakpoint gutter.

In CodeMirror 5, the DOM structure was a bit different and it was possible do achieve that with CSS only, thanks to the :hover::after pseudo element. In code mirror 6, I set the renderEmptyElements option to true, and tried to do something similar (by selecting the div eleents children of my gutter class), but nothing happens and I cannot see anything when filtering with :hover in the debug tools. Is CM6 overring the CSS somehow? If so, do I have another option than adding another state + marker + effect for breakpoint preview?

I don’t know of any reason why styling gutter elements with CSS wouldn’t work.

Thanks for your reply. Looks like I had some CSS issues, I fixed them and now I can see the “shadow breakpoints”. I noticed that although all emptyGutter elements are displayed, they don’t have the cm-gutterElement class attribute until a breakpoint is set. If I remove the breakpoint, the class attribute stays. Is there a mean to have the class atribute on empty elements when they are created?

That was a bug! Attached patch should fix it.

Awesome, thanks!