Skip to content

Commit

Permalink
Transition to new JSON based syntax color scheme format (#24)
Browse files Browse the repository at this point in the history
As of Sublime Text 3 build 3149, a new JSON based color scheme format
`.sublime-color-scheme` (1) was introduced for easier editing,
customization and addition of new features. The documentation for the
new format is available at the main "Color Schemes" documentation (1).
Nord has been migrated to the new format (JSON) from the now
deprecated/legacy `.tmTheme` format (XML) (2).

All versions greater or equal to 3.1 build 3120 come with a builtin tool
to convert legacy themes to the new format through the command palette
only when the files is opened in the editor**: „Convert Color Scheme“

The following additional changes and additions for features that have
been introduced with the new JSON color scheme format are included:

- Added all Nord colors as variables to the `variables` object that are
  exposed through Sublime Text's internal CSS color scheme API to reuse
  them with the CSS `var()` function for the defined scope rules.
- Added additional syntax-specific variables to the `variables` object
  to ensure a uniform color usage for scopes with the same context as
  well as reducing code duplication and possible transmission errors.
- Added the new Git gutter diff keys `line_diff_added`,
  `line_diff_modified` and `line_diff_deleted` to the `globals` object
  to ensure they match Nord's style. (@kaine119)

The now officially deprecated `.tmTheme` color scheme format file (2)
has been removed and is not supported by the Nord theme package anymore.

References:
  (1) https://www.sublimetext.com/docs/3/color_schemes.html
  (2) https://www.sublimetext.com/docs/3/color_schemes_tmtheme.html

Co-authored-by: Kai En <[email protected]>
Includes GH-20
Resolves GH-22
  • Loading branch information
arcticicestudio authored Aug 6, 2019
1 parent 8d01b88 commit 294ab7c
Show file tree
Hide file tree
Showing 3 changed files with 809 additions and 1,874 deletions.
2 changes: 1 addition & 1 deletion Nord.skins
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Nord": {
"Preferences": {
"color_scheme": "Packages/nord-sublime-text/Nord.tmTheme"
"color_scheme": "Packages/nord-sublime-text/Nord.sublime-color-scheme"
}
}
}
Loading

0 comments on commit 294ab7c

Please sign in to comment.