Highlight at-rules #2

Closed
NiedziolkaMichal wants to merge 1 commit from patch-2 into main
NiedziolkaMichal commented 2022-09-30 16:07:17 +02:00 (Migrated from github.com)

Added missing at-rules. Feel free to reorganize them as you wish.

Added missing at-rules. Feel free to reorganize them as you wish.
marijnh commented 2022-10-07 08:28:33 +02:00 (Migrated from github.com)

These don't seem to actually be tokens that the parser produces, so this probably doesn't do what you think it does.

These don't seem to actually be tokens that the parser produces, so this probably doesn't do what you think it does.
NiedziolkaMichal commented 2022-10-07 14:24:09 +02:00 (Migrated from github.com)

You are right, I see that separate statements would need to be created for each of those cases. Would it be possible to add AtRule { AtKeyword commaSep<query> (";" | Block) } to either definitionKeyword or controlKeyword so all at-rules can have the same color?

You are right, I see that separate statements would need to be created for each of those cases. Would it be possible to add `AtRule { AtKeyword commaSep<query> (";" | Block) }` to either `definitionKeyword` or `controlKeyword` so all at-rules can have the same color?
marijnh commented 2022-10-10 11:07:07 +02:00 (Migrated from github.com)

What part of the rule are you trying to style?

What part of the rule are you trying to style?
NiedziolkaMichal commented 2022-10-10 12:49:46 +02:00 (Migrated from github.com)

Its name together with '@' character. Currently it's like that:
image

@layer, @font-face, @container, @counter-style, @property & @page are marked as keywords.

Its name together with '@' character. Currently it's like that: ![image](https://user-images.githubusercontent.com/100634371/194848904-efd213b1-7d26-4584-8431-26959fc77ee1.png) @layer, @font-face, @container, @counter-style, @property & @page are marked as keywords.
marijnh commented 2022-10-10 13:37:43 +02:00 (Migrated from github.com)

And they are keywords, so that seems a reasonable tag to use here?

And they are keywords, so that seems a reasonable tag to use here?
NiedziolkaMichal commented 2022-10-10 13:51:35 +02:00 (Migrated from github.com)

They are, but from, to, selector, all, screen, print are also marked as keyword. Changing color of keyword to yellow in my example, would affect more than just at-rules.

They are, but `from`, `to`, `selector`, `all`, `screen`, `print` are also marked as keyword. Changing color of keyword to yellow in my example, would affect more than just at-rules.
marijnh commented 2022-10-10 16:58:55 +02:00 (Migrated from github.com)

Ah, I see what you mean. Does attached patch, which tags all @ keywords as definitionKeyword, help for you?

Ah, I see what you mean. Does attached patch, which tags all @ keywords as `definitionKeyword`, help for you?
NiedziolkaMichal commented 2022-10-10 17:20:28 +02:00 (Migrated from github.com)

That's perfect. Thank you very much.

That's perfect. Thank you very much.
marijnh commented 2022-10-10 17:28:02 +02:00 (Migrated from github.com)

I've tagged @lezer/css 1.0.1

I've tagged @lezer/css 1.0.1

Pull request closed

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
lezer/css!2
No description provided.