forked from material-foundation/material-tokens
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fd40fd8
Showing
17 changed files
with
3,962 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Material Tokens | ||
|
||
|
||
|
||
Material Design now supports the [Design System Package (DSP) ](https://github.com/AdobeXD/design-system-package-dsp) for importing and exporting Material Tokens within the Material Theme Builder. DSP can be used in designer and developer workflow tools and Material Component libraries. Let’s dive into how you can use Material Tokens (DSP) within the [VSCode extension](https://marketplace.visualstudio.com/items?itemName=Adobe.xd) to generate code. | ||
|
||
|
||
## Getting Started | ||
|
||
Make sure you have the latest version of VSCode installed on your machine. VSCode is free to download and is open source. | ||
|
||
[Download VSCode](https://code.visualstudio.com/) | ||
|
||
After VSCode is installed, navigate to the marketplace on the extensions tab and search for Adobe. | ||
|
||
 | ||
|
||
[Download Adobe XD VSCode extension](https://marketplace.visualstudio.com/items?itemName=Adobe.xd) | ||
|
||
Click on install and you may have to reopen or reload VSCode. After the extension is successfully installed, you can open Adobe XD by searching for Adobe in the command palette or clicking the “XD” icon in the bottom right. | ||
|
||
 | ||
|
||
|
||
After the plugin opens it should look like the following screenshot. | ||
|
||
 | ||
|
||
|
||
|
||
## Opening a DSP | ||
|
||
Download a customized DSP from the Material Theme Builder or default Material Theme values from this repo and save it to your computer. | ||
|
||
Open up the folder in VSCode by either dragging it onto the open window or selecting “Open Folder”. | ||
|
||
 | ||
|
||
|
||
Open the Adobe XD plugin and select “Edit Package” on the bottom left, then select “Select Folder”. There should be a notification on the bottom left that should say “Existing package found…” and click on “Open”. | ||
|
||
 | ||
|
||
|
||
## Exploring the DSP | ||
|
||
With the DSP opened in the plugin you should see the following screenshot. | ||
|
||
 | ||
|
||
|
||
The Material Tokens (DSP) is made up of a few sections (Light, Dark, Default, Palette, Typography). | ||
|
||
|
||
## Generating Code | ||
|
||
After inspecting the DSP you can generate code in the form of tokens to be used in your application. | ||
|
||
Select “Start Editing” and then “Finish Editing” to trigger code generation. If it is the first time you are doing it there will be a notification to install Style Dictionary. | ||
|
||
 | ||
|
||
|
||
Select “Install” then you will see another notification asking to export tokens. | ||
|
||
 | ||
|
||
|
||
Select “Export tokens” then you will see a notification asking you to open the folder. | ||
|
||
 | ||
|
||
|
||
Opening the folder you will see the following sub directories. | ||
|
||
 | ||
|
||
This directory is located in the current directory under a newly generated folder “dist”. | ||
|
||
 | ||
|
||
|
||
Opening up the “variables.css” for example you will see the following flat list of tokens used to theme your application. | ||
|
||
 | ||
|
||
|
||
The “android/colors.xml” should look similar. | ||
|
||
 | ||
|
||
|
||
Using the Material Tokens (DSP) will ensure your styles are shared throughout your designer and developer workflow. Learn more about Material Tokens. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.