Define the all styles before the specific ones #2

Merged
dralletje merged 1 commit from dont-let-all-override-everything into main 2022-05-16 09:09:06 +02:00
dralletje commented 2022-05-15 14:47:00 +02:00 (Migrated from github.com)

After upgrading to the latest codemirror (0.20) I noticed all my syntax highlighting was gone!
Turns out it was the all: ... styles definition for HighlightStyle.define:

HighlightStyle.define(
    [{ tag: tags.content, color: "red" }],
    { all: { color: "black" } }
)

The above code will yield only black text for me.

This PR moves the style definition of all higher in the CSS, so it will be overwritten by the, more specific, tag styles.

After upgrading to the latest codemirror (0.20) I noticed all my syntax highlighting was gone! Turns out it was the `all: ...` styles definition for `HighlightStyle.define`: ```javascript HighlightStyle.define( [{ tag: tags.content, color: "red" }], { all: { color: "black" } } ) ``` The above code will yield only black text for me. This PR moves the style definition of `all` higher in the CSS, so it will be overwritten by the, more specific, tag styles.
marijnh commented 2022-05-16 09:09:48 +02:00 (Migrated from github.com)

That seems reasonable, thanks.

That seems reasonable, thanks.
fonsp commented 2022-05-17 15:58:11 +02:00 (Migrated from github.com)

Hey Marijn! Could you tag a new release for language? We are having some trouble generating the .d.ts files when installing language directly from git.

Hey Marijn! Could you tag a new release for `language`? We are having some trouble generating the `.d.ts` files when installing `language` directly from git.
marijnh commented 2022-05-18 10:36:48 +02:00 (Migrated from github.com)

I've tagged 0.20.1

I've tagged 0.20.1
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/language!2
No description provided.