Selection in editor mode using color that containing alpha channel

Steps to reproduce

  • in obsidian.css set --text-selection to the colour with alpha channel (e.g. rgba(255, 255, 0, 0.4);
  • open a note with more than 2 paragraph of texts
  • drag a cursor to select more than one paragraph

Expected result

expect to see selection part with defined smooth color

Actual result

one paragraph is okay

two or more paragraph results as follows:

No problem with solid color (without alpha channel)


  • Operating system: MacOS
  • Obsidian version: 0.7.1
  • Using custom CSS: Pisum theme (need to change the text-selection manually)

Additional information

Does this happen with the default css?

Just confirm. It also happens in default css.

Sorry I don’t think we can fix this. We’ve updated the editor to use non-transparent colors for selection, and this issue should go away now.

This is how CodeMirror selection works, and CodeMirror uses colors without alpha value to bypass this problem as well.

1 Like