diff --git a/index.less b/index.less index 55008a5..9bad8af 100644 --- a/index.less +++ b/index.less @@ -1,221 +1,6 @@ -@import 'syntax-variables'; +@import "styles/syntax-variables.less"; -atom-text-editor { - background-color: @syntax-background-color; - color: @syntax-text-color; +@import "styles/editor.less"; +@import "styles/syntax-legacy/_base.less"; - .invisible-character { - color: @syntax-invisible-character-color; - } - - .indent-guide { - color: @syntax-indent-guide-color; - } - - .wrap-guide { - background-color: @syntax-wrap-guide-color; - } - - .gutter { - background-color: @syntax-gutter-background-color; - } - - .line-number.cursor-line-no-selection { - background-color: @syntax-gutter-background-color-selected; - } - - .invisible { - color: @syntax-text-color; - } - - .cursor { - border-color: @syntax-cursor-color; - } - - .selection .region { - background-color: @syntax-selection-color; - } - - .search-results .syntax--marker .region { - background-color: transparent; - border: 1px solid @syntax-result-marker-color; - } - - .search-results .syntax--marker.current-result .region { - border: 1px solid @syntax-result-marker-color-selected; - } - - .syntax--gfm { - .syntax--markup { - &.syntax--heading { - color: @green; - font-weight: bold; - } - - &.syntax--underline { - color: @yellow; - text-decoration: underline; - } - } - - .syntax--bold { - font-weight: bold; - } - - .syntax--italic { - font-style: italic; - } - - .syntax--raw { - color: @blue; - } - - .syntax--variable.syntax--list { - color: @pink; - font-weight: bold; - } - - .syntax--link { - color: @light-gray; - - .syntax--entity { - color: @purple; - } - } - } -} - -.syntax--comment { - color: @brown; -} - -.syntax--constant { - &.syntax--character, - &.syntax--language, - &.syntax--numeric, - &.syntax--other { - color: @purple; - } -} - -.syntax--entity { - &.syntax--name.syntax--class { - text-decoration: none; - color: @green; - } - - &.syntax--name.syntax--function { - color: @green; - } - - &.syntax--name.syntax--instance { - color: @blue; - } - - &.syntax--name.syntax--tag { - color: @pink; - } - - &.syntax--other.syntax--attribute-name { - color: @green; - } - - &.syntax--other.syntax--inherited-class { - font-style: italic; - text-decoration: none; - color: @green; - } -} - -.syntax--invalid { - color: @ghost-white; - background-color: @pink; - - &.syntax--deprecated { - background-color: @purple; - } -} - -.syntax--keyword { - color: @pink !important; -} - -.syntax--meta.syntax--tag { - color: @syntax-text-color; -} - -.syntax--storage { - color: @pink; - - &.syntax--type { - font-style: italic; - color: @blue; - } -} - -.syntax--string { - color: @yellow; -} - -.syntax--support { - &.syntax--constant, - &.syntax--function { - color: @blue; - } - - &.syntax--class, - &.syntax--type { - font-style: italic; - color: @blue; - } -} - -.syntax--variable { - &.syntax--parameter { - font-style: italic; - color: @orange; - } - - // 'self' Python - &.syntax--language.syntax--python, - // 'this' Javascript - &.syntax--language.syntax--js { - color: @pink; - } -} - -// Jade syntax -.syntax--class.syntax--jade { - color: @purple; -} - -.syntax--js { - .syntax--template { - .syntax--element { - .syntax--quasi.syntax--begin, .syntax--quasi.syntax--end, .syntax--language { - color: @pink; - } - - .syntax--variable, .syntax--brace, .syntax--comma { - color: @syntax-text-color; - } - - .syntax--constant { - color: @purple; - } - } - } -} - -.syntax--json { - .syntax--key { - .syntax--string, - &.syntax--string.syntax--quoted.syntax--double.syntax--dictionary { - color: @green; - } - } - .syntax--markup.syntax--underline.syntax--link { - color: @blue; - text-decoration: underline; - } -} +@import "styles/syntax/base.less"; diff --git a/package.json b/package.json index b0ac065..683d05d 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,10 @@ "version": "0.28.0", "private": true, "description": "A monokai theme", + "keywords": [ + "syntax", + "theme" + ], "repository": "https://github.com/kevinsawicki/monokai", "license": "MIT", "engines": { diff --git a/styles/editor.less b/styles/editor.less new file mode 100644 index 0000000..4464823 --- /dev/null +++ b/styles/editor.less @@ -0,0 +1,59 @@ +atom-text-editor { + background-color: @syntax-background-color; + color: @syntax-text-color; + + .wrap-guide { + background-color: @syntax-wrap-guide-color; + } + + .indent-guide { + color: @syntax-indent-guide-color; + } + + .invisible-character { + color: @syntax-invisible-character-color; + } + + .gutter { + background-color: @syntax-gutter-background-color; + color: @syntax-gutter-text-color; + + .line-number { + &.cursor-line { + background-color: @syntax-gutter-background-color-selected; + color: @syntax-gutter-text-color-selected; + } + + &.cursor-line-no-selection { + color: @syntax-gutter-text-color-selected; + } + } + } + + .gutter .line-number.folded, + .gutter .line-number:after, + .fold-marker:after { + color: @light-gray; + } + + .invisible { + color: @syntax-text-color; + } + + .cursor { + border-color: @syntax-cursor-color; + } + + .selection .region { + background-color: @syntax-selection-color; + } + + .search-results .syntax--marker .region { + background-color: transparent; + border: 1px solid @syntax-result-marker-color; + } + + .search-results .syntax--marker.current-result .region { + border: 1px solid @syntax-result-marker-color-selected; + } +} diff --git a/styles/syntax-legacy/_base.less b/styles/syntax-legacy/_base.less new file mode 100644 index 0000000..c128781 --- /dev/null +++ b/styles/syntax-legacy/_base.less @@ -0,0 +1,136 @@ +@import 'syntax-variables'; + +.syntax--comment { + color: @brown; +} + +.syntax--constant { + &.syntax--character, + &.syntax--language, + &.syntax--numeric, + &.syntax--other { + color: @purple; + } +} + +.syntax--entity { + &.syntax--name.syntax--class { + text-decoration: none; + color: @green; + } + + &.syntax--name.syntax--function { + color: @green; + } + + &.syntax--name.syntax--instance { + color: @blue; + } + + &.syntax--name.syntax--tag { + color: @pink; + } + + &.syntax--other.syntax--attribute-name { + color: @green; + } + + &.syntax--other.syntax--inherited-class { + font-style: italic; + text-decoration: none; + color: @green; + } +} + +.syntax--invalid { + color: @ghost-white; + background-color: @pink; + + &.syntax--deprecated { + background-color: @purple; + } +} + +.syntax--keyword { + color: @pink !important; +} + +.syntax--meta.syntax--tag { + color: @syntax-text-color; +} + +.syntax--storage { + color: @pink; + + &.syntax--type { + font-style: italic; + color: @blue; + } +} + +.syntax--string { + color: @yellow; +} + +.syntax--support { + &.syntax--constant, + &.syntax--function { + color: @blue; + } + + &.syntax--class, + &.syntax--type { + font-style: italic; + color: @blue; + } +} + +.syntax--variable { + &.syntax--parameter { + font-style: italic; + color: @orange; + } + + // 'self' Python + &.syntax--language.syntax--python, + // 'this' Javascript + &.syntax--language.syntax--js { + color: @pink; + } +} + +// Jade syntax +.syntax--class.syntax--jade { + color: @purple; +} + +.syntax--js { + .syntax--template { + .syntax--element { + .syntax--quasi.syntax--begin, .syntax--quasi.syntax--end, .syntax--language { + color: @pink; + } + + .syntax--variable, .syntax--brace, .syntax--comma { + color: @syntax-text-color; + } + + .syntax--constant { + color: @purple; + } + } + } +} + +.syntax--json { + .syntax--key { + .syntax--string, + &.syntax--string.syntax--quoted.syntax--double.syntax--dictionary { + color: @green; + } + } + .syntax--markup.syntax--underline.syntax--link { + color: @blue; + text-decoration: underline; + } +} \ No newline at end of file diff --git a/styles/syntax-variables.less b/styles/syntax-variables.less index 9f9f611..cfc2605 100644 --- a/styles/syntax-variables.less +++ b/styles/syntax-variables.less @@ -1,4 +1,4 @@ -@import "colors"; +@import "colors.less"; // General colors @syntax-text-color: @light-ghost-white; diff --git a/styles/syntax/base.less b/styles/syntax/base.less new file mode 100644 index 0000000..a45fc05 --- /dev/null +++ b/styles/syntax/base.less @@ -0,0 +1,167 @@ +/* + This defines styling rules for syntax classes. + + See the naming conventions for a list of syntax classes: + https://flight-manual.atom.io/hacking-atom/sections/syntax-naming-conventions + + When styling rules conflict: + - The last rule overrides previous rules. + - The rule with most classes and pseudo-classes overrides the last rule. +*/ + +// /* comment */ +.syntax--comment { + color: @brown; + + // @param TODO NOTE + &.syntax--caption { + color: @blue; + font-style: italic; + } + + // variable function type + &.syntax--term { + color: @blue; + } + + // { } / . + &.syntax--punctuation { + color: @brown; + font-weight: normal; + } +} + +.syntax--constant { + color: @purple; +} + +.syntax--entity { + &.syntax--class { + text-decoration: none; + color: @green; + } + + &.syntax--function { + color: @green; + } + + &.syntax--type { + font-style: italic; + color: @blue; + } + + &.syntax--inherited { + font-style: italic; + text-decoration: none; + color: @green; + } + + &.syntax--support { + color: @blue; + } + + &.syntax--tag { + color: @pink; + } + + &.syntax--attribute { + color: @green; + } + + &.syntax--variable { + &.syntax--parameter { + font-style: italic; + color: @orange; + } + } +} + +.syntax--invalid { + color: @ghost-white; + background-color: @pink; + + &.syntax--deprecated { + background-color: @purple; + } +} + +.syntax--keyword { + color: @pink; + + &.syntax--storage { + color: @pink; + + &.syntax--declaration { + font-style: italic; + color: @blue; + } + } + + &.syntax--type { + font-style: italic; + color: @blue; + } + + &.syntax--variable { + color: @pink; + } +} + +// __formatted__ +.syntax--markup { + + // # Heading + &.syntax--heading { + color: @green; + font-weight: bold; + } + + // - item + &.syntax--list { + color: @pink; + font-weight: bold; + } + + // > quote + &.syntax--quote { + color: @pink; + } + + // **bold** + &.syntax--bold { + font-weight: bold; + } + + // *italic* + &.syntax--italic { + font-style: italic; + } + + // __underline__ + &.syntax--underline { + text-decoration: underline; + } + + // `raw` + &.syntax--raw { + color: @blue; + } + + // url.com (path) + &.syntax--link { + color: @light-gray; + } + + // [alt] ![alt] + &.syntax--alt { + color: #ddd; + } +} + +.syntax--string { + color: @yellow; +} + +.syntax--text { + color: @syntax-text-color; +}