Skip to main content

Creating Themes

This document outlines how to create your own themes for Phoenix Code.

Follow these steps to create a new theme:

Step 1:

Open this link Theme-Template. This is the default Phoenix Code theme template repository.

Theme Template Repo Image

Step 2:

Use the template to create your repository.

Step 3:

Clone the repository you created in Step 2 to your local machine.

Go to https://create.phcode.dev. This is a development-focused version of phcode.dev which shows non minified JS/CSS files in the browser developer tools.

Now, open the cloned folder in create.phcode.dev. Refer to this guide to see how to open a folder in Phoenix Code.

Cloned Repo Image

Step 4:

Now, go to package.json file and update the values accordingly.

Here is a quick reference :-

FieldDescription
titleReplace "Name of the theme" with the actual title of your theme.
nameChange github-<owner>-<repo> to your specific package name, formatted as github-yourusername-repositoryname.
descriptionUpdate to a brief, relevant description about your theme.
versionStart with "0.0.1" or update to reflect your current version following semantic versioning.
licenseConfirm "MIT" is suitable or specify another license, if necessary.
authorReplace with your name and a link to your GitHub profile or another URL.
homepageSet to the URL of your project’s homepage or GitHub repository.
enginesEnsure compatibility with the required Brackets version, e.g., ">=3.0.0".
categoriesUpdate "demo" with relevant categories that fit your theme.
keywordsUpdate or append additional keywords that describe your theme. Example :- ‘dark-theme’, ‘aesthetic’, ‘blue’.
themeMake sure all necessary theme files and folders are included. Set “Dark” to true if its a dark theme, else false.

Save the file after making all the changes.

Step 5:

Now, go to my-theme.less file. Click on Debug in the Menu bar and select Load Project As Extension.

Debug Menu Image

This should be the default output.

Default Theme Image

This file contains all the UI elements as variables. You can modify the colors as per your needs and live preview them.

You can also select Debug > Reload Project As Extension to test the new code changes.

When you are done developing the theme, select Debug > Unload Project As Extension to unload the theme.

Once the theme is complete, you can publish it to phcode.dev extension repository.

Refer to this link to see how to publish the theme.