Skip to content

Conversation

@FifthTundraG
Copy link
Contributor

No description provided.

@starball5
Copy link

You might want to take a look at the other things that @wileycoyote78 did in their https://github.com/wileycoyote78/custom-css/blob/main/.vscode/custom-css.json

@FifthTundraG
Copy link
Contributor Author

You might want to take a look at the other things that @wileycoyote78 did in their https://github.com/wileycoyote78/custom-css/blob/main/.vscode/custom-css.json

I'm aware that I did not add @container, the system for syntax highlighting at-rules built-in to vscode differs from the custom-css.json file @wileycoyote78 made in that it appears to be much more difficult. I attempted to add it, but it seems to require a bunch of regex which I am unfamiliar with. I might attempt to venture into this in the future, but for now at least we have something 🙂

@wileycoyote78
Copy link

I was meaning to get into learning syntax hilighting, too. I don't care much for regex, though. 😅

@wileycoyote78
Copy link

wileycoyote78 commented Aug 13, 2023

Figured it out!
See my pull request .

In looking at the cson file, I realized there is no need to deal with regex. The @container is basically identical to @media. So, I just copied the @media block, pasted it, and changed the regex to look for 'container' in the new lines.

I tested by going directly into my css.tmLanguage.json file and doing the same thing (copied the @media block). And it works!

@starball5

@FifthTundraG
Copy link
Contributor Author

Figured it out! See my pull request .

In looking at the cson file, I realized there is no need to deal with regex. The @container is basically identical to @media. So, I just copied the @media block, pasted it, and changed the regex to look for 'container' in the new lines.

I tested by going directly into my css.tmLanguage.json file and doing the same thing (copied the @media block). And it works!

@starball5

Yay!

@wileycoyote78
Copy link

Also added your changes to my local file, and it works! Thanks!

P.S.: aspect-ratio also is not colorized, but now I know how to fix it... :)

Copy link
Contributor

@andreamah andreamah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@andreamah andreamah merged commit 1287bd7 into microsoft:main Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants