Update create theme guide based on feedback

This commit is contained in:
Matt Colyer
2013-08-29 09:09:19 -07:00
parent 93a0c6eeb5
commit 647dcd5988

View File

@@ -15,6 +15,7 @@
* Git - to track and distribute your themes
* What do I need to know?
* CSS/LESS - as that's what themes are written in
* Devtools - so you can find the selector you're looking for.
* Is there an example I can start from?
* Yes, you can clone https://github.com/atom/solarized-dark-syntax
@@ -26,39 +27,20 @@ mkdir my-theme
cd my-theme
git init
mkdir stylesheets
cat > package.json <<END
{
"name": "theme-rainbow",
"theme": true,
"stylesheets": [
'included-first.less',
'included-second.less'
]
"version": "0.0.1",
"description": "Rainbows are beautiful",
"repository": {
"type": "git",
"url": "https://github.com/atom/theme-rainbow.git"
},
"bugs": {
"url": "https://github.com/atom/theme-rainbow/issues"
},
"engines": {
"atom": "~>1.0"
}
}
apm init --theme
cat > index.less <<END
@import "./stylesheets/base.less";
@import "./stylesheets/overrides.less";
END
cat > stylesheets/included-first.less <<END
cat > stylesheets/base.less <<END
@import "ui-variables";
.editor {
color: fade(@text-color, 20%);
}
END
cat > stylesheets/included-second.less <<END
@import "ui-colors";
cat > stylesheets/overrides.less <<END
@import "ui-variables";
.editor {
color: fade(@text-color, 80%);
@@ -68,19 +50,27 @@ END
### Important points
* Notice the theme attribute in the package.json file. This is specific to Atom
and required for all theme packages. Otherwise they won't be displayed in the
theme chooser.
* Notice the stylesheets attribute. If have multiple stylesheets and their order
is meaningful than you should specify their relative pathnames here. Otherwise
all css or less files will be loaded alphabetically from the stylesheets
folder.
* Notice the theme attribute in the package.json file (generated by apm). This
is specific to Atom and required for all theme packages. Otherwise they won't
be displayed in the theme chooser.
* Notice the ui-variables require. If you'd like to make your theme adapt to the
users choosen ui theme, these variables allow you to create your own colors
based on them.
## Create a minimal ui theme
## How to create a UI theme
* Needs to have a file called ui-variables and it must contain the following
variables:
* A list of variables from @benogle's theme refactor.
## How to just override UI colors
* Not interested in making an entire theme? Not to worry, you can override just
the colors.
* Create a theme as above but just include a single file in your `stylesheets`
directory called `ui-variables.less`
* IMPORTANT: This theme must come before
## How to create a syntax theme
* Explain the idea behind grammars/tokens and classes you'd want to override.