2018-07-17
Adding VS Code Theme to CodeSandBox
vscode, codesandbox
vscode, codesandbox
Have you ever wanted to match your CodeSandBox Editor Theme to match your Visual Studio Code Color Theme? Well, you can.
It's because of CodeSandBox uses Monaco (a VS Code editor engine) by default.
Follow along to make the magicย โจ happen~
Here are the steps to make it happen.
Let's do this ๐ช.
Let's grab the color theme settings from VS Code. I am using Cobalt2 theme on CodeSandBox, and will be updating it to use Fairy Floss theme (Found from this post) on VS Code.
From VS Code,
[caption id="attachment_1091" align="aligncenter" width="643"]
show all commands[/caption]After executing the command, you will see a new tab, Untitled-1 popping up with Color Theme in JSON format.
[caption id="attachment_1092" align="aligncenter" width="713"]
untitled-1[/caption]Now select all (Ctrl+A) and copy the content.
Click on "Preferences" gear โ๏ธ button to open PREFERENCES modal box.
[caption id="attachment_1093" align="aligncenter" width="1064"]
Click Preference[/caption]And now paste the VS Code Color Theme copied from the previous step in the Custom VSCode Theme text area. You can now see that the theme has been updated globally.
[caption id="attachment_1095" align="aligncenter" width="1536"]
result[/caption]Ok, now Enjoy the new Look & Feel ๐.
Here is the video of steps above.
https://youtu.be/HhaOuFMl9zI
Note that the change is global. That means, all previous SandBoxes (that's what CodeSandBox calls each project) will be affected as well.
But I am sure that the default behavior is probably what you want, anyways ๐.