Skip to content

Focused selection color will soon need a more specific selector #8

@marijnh

Description

@marijnh

To address a bug where, if people put CodeMirror editors inside another CodeMirror editor, the outer editor's focused state affects the selection and cursor styling of the inner editors, I will soon put out a release of @codemirror/view that uses a more specific style rule for the default focused selection color. In order for themes to still override this, they will need to match the specificity. I.e., in create-theme.ts, this line (note also the typo, #7)...

'&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection':

... must become ...

'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection':

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions