Improving visibility of caret(cursor) position in editor mode

For beginners: If second piece of css code↑ does not have effect, then the --background-active variable needs to be defined, for example:

.theme-dark {
  --background-active: #253144; /* = #RRGGBB format */
}
.theme-light {
  --background-active: #FFFFEE;
}