From 4b6769e2a42b9ef7a1b4c4fb4d99968b00d2405d Mon Sep 17 00:00:00 2001 From: David Wilson Date: Tue, 2 Oct 2018 11:50:58 -0700 Subject: [PATCH] :arrow_right: Migrate core package 'base16-tomorrow-dark-theme' into ./packages --- package-lock.json | 3 +- package.json | 4 +- packages/README.md | 3 +- .../base16-tomorrow-dark-theme/LICENSE.md | 20 ++ packages/base16-tomorrow-dark-theme/README.md | 13 + .../base16-tomorrow-dark-theme/index.less | 10 + .../base16-tomorrow-dark-theme/package.json | 16 ++ .../styles/colors.less | 23 ++ .../styles/editor.less | 59 ++++ .../styles/syntax-variables.less | 45 +++ .../styles/syntax/_base.less | 270 ++++++++++++++++++ .../styles/syntax/cs.less | 5 + .../styles/syntax/json.less | 21 ++ 13 files changed, 486 insertions(+), 6 deletions(-) create mode 100644 packages/base16-tomorrow-dark-theme/LICENSE.md create mode 100644 packages/base16-tomorrow-dark-theme/README.md create mode 100644 packages/base16-tomorrow-dark-theme/index.less create mode 100644 packages/base16-tomorrow-dark-theme/package.json create mode 100644 packages/base16-tomorrow-dark-theme/styles/colors.less create mode 100644 packages/base16-tomorrow-dark-theme/styles/editor.less create mode 100644 packages/base16-tomorrow-dark-theme/styles/syntax-variables.less create mode 100644 packages/base16-tomorrow-dark-theme/styles/syntax/_base.less create mode 100644 packages/base16-tomorrow-dark-theme/styles/syntax/cs.less create mode 100644 packages/base16-tomorrow-dark-theme/styles/syntax/json.less diff --git a/package-lock.json b/package-lock.json index 71b44d14f29..ceff7b6c989 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1029,8 +1029,7 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base16-tomorrow-dark-theme": { - "version": "https://www.atom.io/api/packages/base16-tomorrow-dark-theme/versions/1.6.0/tarball", - "integrity": "sha512-5h2CeNhHOEG8InVyah+PcANjVOgtWAbpsBHmLfYwhhTU+yKS3ZWbYvnZg6B9A8gDy9Jrmq2ZmnWL47qLDUaztg==" + "version": "file:packages/base16-tomorrow-dark-theme" }, "base16-tomorrow-light-theme": { "version": "https://www.atom.io/api/packages/base16-tomorrow-light-theme/versions/1.6.0/tarball", diff --git a/package.json b/package.json index f587714ebb3..fa3f6b413e4 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "autosave": "https://www.atom.io/api/packages/autosave/versions/0.24.6/tarball", "babel-core": "5.8.38", "background-tips": "https://www.atom.io/api/packages/background-tips/versions/0.28.0/tarball", - "base16-tomorrow-dark-theme": "https://www.atom.io/api/packages/base16-tomorrow-dark-theme/versions/1.6.0/tarball", + "base16-tomorrow-dark-theme": "file:packages/base16-tomorrow-dark-theme", "base16-tomorrow-light-theme": "https://www.atom.io/api/packages/base16-tomorrow-light-theme/versions/1.6.0/tarball", "bookmarks": "https://www.atom.io/api/packages/bookmarks/versions/0.45.1/tarball", "bracket-matcher": "https://www.atom.io/api/packages/bracket-matcher/versions/0.89.3/tarball", @@ -174,7 +174,7 @@ "atom-dark-ui": "file:./packages/atom-dark-ui", "atom-light-syntax": "file:./packages/atom-light-syntax", "atom-light-ui": "file:./packages/atom-light-ui", - "base16-tomorrow-dark-theme": "1.6.0", + "base16-tomorrow-dark-theme": "file:./packages/base16-tomorrow-dark-theme", "base16-tomorrow-light-theme": "1.6.0", "one-dark-ui": "file:./packages/one-dark-ui", "one-light-ui": "file:./packages/one-light-ui", diff --git a/packages/README.md b/packages/README.md index fc3fdc7864c..51e17326cc9 100644 --- a/packages/README.md +++ b/packages/README.md @@ -21,7 +21,7 @@ See [RFC 003](https://github.com/atom/atom/blob/master/docs/rfcs/003-consolidate | **autoflow** | [`atom/autoflow`](./autoflow) | [#17833](https://github.com/atom/atom/issues/17833) | | **autosave** | [`atom/autosave`][autosave] | [#17834](https://github.com/atom/atom/issues/17834) | | **background-tips** | [`atom/background-tips`][background-tips] | [#17835](https://github.com/atom/atom/issues/17835) | -| **base16-tomorrow-dark-theme** | [`atom/base16-tomorrow-dark-theme`][base16-tomorrow-dark-theme] | [#17836](https://github.com/atom/atom/issues/17836) | +| **base16-tomorrow-dark-theme** | [`./base16-tomorrow-dark-theme`](./base16-tomorrow-dark-theme) | [#17836](https://github.com/atom/atom/issues/17836) | | **base16-tomorrow-light-theme** | [`atom/base16-tomorrow-light-theme`][base16-tomorrow-light-theme] | [#17837](https://github.com/atom/atom/issues/17837) | | **bookmarks** | [`atom/bookmarks`][bookmarks] | | | **bracket-matcher** | [`atom/bracket-matcher`][bracket-matcher] | | @@ -108,7 +108,6 @@ See [RFC 003](https://github.com/atom/atom/blob/master/docs/rfcs/003-consolidate [autocomplete-snippets]: https://github.com/atom/autocomplete-snippets [autosave]: https://github.com/atom/autosave [background-tips]: https://github.com/atom/background-tips -[base16-tomorrow-dark-theme]: https://github.com/atom/base16-tomorrow-dark-theme [base16-tomorrow-light-theme]: https://github.com/atom/base16-tomorrow-light-theme [bookmarks]: https://github.com/atom/bookmarks [bracket-matcher]: https://github.com/atom/bracket-matcher diff --git a/packages/base16-tomorrow-dark-theme/LICENSE.md b/packages/base16-tomorrow-dark-theme/LICENSE.md new file mode 100644 index 00000000000..4d231b4563b --- /dev/null +++ b/packages/base16-tomorrow-dark-theme/LICENSE.md @@ -0,0 +1,20 @@ +Copyright (c) 2014 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/base16-tomorrow-dark-theme/README.md b/packages/base16-tomorrow-dark-theme/README.md new file mode 100644 index 00000000000..51d256fbbd3 --- /dev/null +++ b/packages/base16-tomorrow-dark-theme/README.md @@ -0,0 +1,13 @@ +# Base16 Tomorrow Dark Syntax theme + +Atom theme using the ever popular [Base16 Tomorrow](http://chriskempson.github.io/base16/#tomorrow) dark colors. + +![Base16 Tomorrow light](https://cloud.githubusercontent.com/assets/378023/10118589/f108a568-64b6-11e5-8438-eb34dc9b40a1.png) + + +## Install + +This theme is installed by default with Atom and can be activated by going to the _Themes_ section in the Settings view (`cmd-,`) and selecting it from the _Syntax Themes_ drop-down menu. + +A +[light version](../base16-tomorrow-light-theme) of this theme is also available. diff --git a/packages/base16-tomorrow-dark-theme/index.less b/packages/base16-tomorrow-dark-theme/index.less new file mode 100644 index 00000000000..bebbc05a72a --- /dev/null +++ b/packages/base16-tomorrow-dark-theme/index.less @@ -0,0 +1,10 @@ + +// Base16 Tomorrow Dark theme + +@import "styles/syntax-variables.less"; + +@import "styles/editor.less"; + +@import "styles/syntax/_base.less"; +@import "styles/syntax/cs.less"; +@import "styles/syntax/json.less"; diff --git a/packages/base16-tomorrow-dark-theme/package.json b/packages/base16-tomorrow-dark-theme/package.json new file mode 100644 index 00000000000..70b24173416 --- /dev/null +++ b/packages/base16-tomorrow-dark-theme/package.json @@ -0,0 +1,16 @@ +{ + "name": "base16-tomorrow-dark-theme", + "theme": "syntax", + "version": "1.6.0", + "description": "Base16 dark theme for Atom", + "keywords": [ + "base16", + "dark", + "syntax" + ], + "repository": "https://github.com/atom/atom", + "license": "MIT", + "engines": { + "atom": ">0.49.0" + } +} diff --git a/packages/base16-tomorrow-dark-theme/styles/colors.less b/packages/base16-tomorrow-dark-theme/styles/colors.less new file mode 100644 index 00000000000..989e0b17a4f --- /dev/null +++ b/packages/base16-tomorrow-dark-theme/styles/colors.less @@ -0,0 +1,23 @@ + +// Base16 Tomorrow +// A color scheme by Chris Kempson (http://chriskempson.com) + +// Grayscale +@black: #1d1f21; // 00 +@very-dark-gray: #282a2e; // 01 +@dark-gray: #373b41; // 02 +@gray: #969896; // 03 +@light-gray: #b4b7b4; // 04 +@very-light-gray: #c5c8c6; // 05 +@almost-white: #e0e0e0; // 06 +@white: #ffffff; // 07 + +// Colors +@red: #cc6666; // 08 +@orange: #de935f; // 09 +@yellow: #f0c674; // 0A +@green: #b5bd68; // 0B +@cyan: #8abeb7; // 0C +@blue: #81a2be; // 0D +@purple: #b294bb; // 0E +@brown: #a3685a; // 0F diff --git a/packages/base16-tomorrow-dark-theme/styles/editor.less b/packages/base16-tomorrow-dark-theme/styles/editor.less new file mode 100644 index 00000000000..654fab3dd4c --- /dev/null +++ b/packages/base16-tomorrow-dark-theme/styles/editor.less @@ -0,0 +1,59 @@ + +// Editor styles (background, gutter, guides) + +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 { + padding: 0 0.25em 0 0.5em; + -webkit-font-smoothing: antialiased; + &.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: @syntax-result-marker-color; + } + + .invisible { + color: @syntax-text-color; + } + + .cursor { + color: @syntax-cursor-color; + } + + .selection .region { + background-color: @syntax-selection-color; + } + + .bracket-matcher .region { + border-color: @syntax-result-marker-color; + } +} diff --git a/packages/base16-tomorrow-dark-theme/styles/syntax-variables.less b/packages/base16-tomorrow-dark-theme/styles/syntax-variables.less new file mode 100644 index 00000000000..5a43608a3b8 --- /dev/null +++ b/packages/base16-tomorrow-dark-theme/styles/syntax-variables.less @@ -0,0 +1,45 @@ +@import "colors.less"; + +// Official Syntax Variables + +// General colors +@syntax-text-color: @very-light-gray; +@syntax-cursor-color: @white; +@syntax-selection-color: @dark-gray; +@syntax-selection-flash-color: @very-light-gray; +@syntax-background-color: @black; + +// Guide colors +@syntax-wrap-guide-color: mix(@gray, @dark-gray, 25%); +@syntax-indent-guide-color: mix(@gray, @dark-gray, 25%); +@syntax-invisible-character-color: mix(@gray, @dark-gray, 25%); + +// For find and replace markers +@syntax-result-marker-color: @gray; +@syntax-result-marker-color-selected: @white; + +// Gutter colors +@syntax-gutter-text-color: @gray; +@syntax-gutter-text-color-selected: @very-light-gray; +@syntax-gutter-background-color: @syntax-background-color; +@syntax-gutter-background-color-selected: @syntax-selection-color; + +// For git diff info. i.e. in the gutter +@syntax-color-renamed: @blue; +@syntax-color-added: @green; +@syntax-color-modified: @orange; +@syntax-color-removed: @red; + +// For language entity colors +@syntax-color-variable: @red; +@syntax-color-constant: @orange; +@syntax-color-property: @syntax-text-color; +@syntax-color-value: @green; +@syntax-color-function: @blue; +@syntax-color-method: @blue; +@syntax-color-class: @yellow; +@syntax-color-keyword: @purple; +@syntax-color-tag: @red; +@syntax-color-attribute: @orange; +@syntax-color-import: @purple; +@syntax-color-snippet: @green; diff --git a/packages/base16-tomorrow-dark-theme/styles/syntax/_base.less b/packages/base16-tomorrow-dark-theme/styles/syntax/_base.less new file mode 100644 index 00000000000..e4ca4064cc6 --- /dev/null +++ b/packages/base16-tomorrow-dark-theme/styles/syntax/_base.less @@ -0,0 +1,270 @@ + +// Language syntax highlighting + +.syntax--comment { + color: @gray; + + .syntax--markup.syntax--link { + color: @gray; + } +} + +.syntax--entity { + + &.syntax--name.syntax--type { + color: @yellow; + } + + &.syntax--other.syntax--inherited-class { + color: @green; + } +} + +.syntax--keyword { + color: @purple; + + &.syntax--control { + color: @purple; + } + + &.syntax--operator { + color: @syntax-text-color; + } + + &.syntax--other.syntax--special-method { + color: @blue; + } + + &.syntax--other.syntax--unit { + color: @orange; + } +} + +.syntax--storage { + color: @purple; +} + +.syntax--constant { + color: @orange; + + &.syntax--character.syntax--escape { + color: @cyan; + } + + &.syntax--numeric { + color: @orange; + } + + &.syntax--other.syntax--color { + color: @cyan; + } + + &.syntax--other.syntax--symbol { + color: @cyan; + } +} + +.syntax--variable { + color: @red; + + &.syntax--interpolation { + color: @brown; + } + + &.syntax--parameter.syntax--function { + color: @syntax-text-color; + } +} + +.syntax--invalid.syntax--illegal { + background-color: @red; + color: @syntax-background-color; +} + +.syntax--string { + color: @green; + + + &.syntax--regexp { + color: @cyan; + + .syntax--source.syntax--ruby.syntax--embedded { + color: @yellow; + } + } + + &.syntax--other.syntax--link { + color: @red; + } +} + +.syntax--punctuation { + &.syntax--definition { + &.syntax--parameters, + &.syntax--array { + color: @syntax-text-color; + } + + &.syntax--heading, + &.syntax--identity { + color: @blue; + } + + &.syntax--bold { + color: @yellow; + font-weight: bold; + } + + &.syntax--italic { + color: @purple; + font-style: italic; + } + } + + &.syntax--section { + &.syntax--embedded { + color: @brown; + } + + &.syntax--method, + &.syntax--class, + &.syntax--inner-class { + color: @syntax-text-color; + } + } +} + +.syntax--support { + &.syntax--class { + color: @yellow; + } + + &.syntax--function { + color: @cyan; + + &.syntax--any-method { + color: @blue; + } + } +} + +.syntax--entity { + + &.syntax--name.syntax--function { + color: @blue; + } + + &.syntax--name.syntax--class, &.syntax--name.syntax--type.syntax--class { + color: @yellow; + } + + &.syntax--name.syntax--section { + color: @blue; + } + + &.syntax--name.syntax--tag { + color: @red; + } + + &.syntax--other.syntax--attribute-name { + color: @orange; + + &.syntax--id { + color: @blue; + } + } +} + +.syntax--meta { + &.syntax--class { + color: @yellow; + + &.syntax--body { + color: @syntax-text-color; + } + } + + &.syntax--link { + color: @orange; + } + + &.syntax--method-call, + &.syntax--method { + color: @syntax-text-color; + } + + &.syntax--require { + color: @blue; + } + + &.syntax--selector { + color: @purple; + } + + &.syntax--separator { + background-color: #373b41; + color: @syntax-text-color; + } + + &.syntax--tag { + color: @syntax-text-color; + } +} + +.syntax--none { + color: @syntax-text-color; +} + +.syntax--markup { + &.syntax--bold { + color: @orange; + font-weight: bold; + } + + &.syntax--changed { + color: @purple; + } + + &.syntax--deleted { + color: @red; + } + + &.syntax--italic { + color: @purple; + font-style: italic; + } + + &.syntax--heading { + color: @red; + + .syntax--punctuation.syntax--definition.syntax--heading { + color: @blue; + } + } + + &.syntax--link { + color: @blue; + } + + &.syntax--inserted { + color: @green; + } + + &.syntax--quote { + color: @orange; + } + + &.syntax--raw { + color: @green; + } +} + +.syntax--source.syntax--gfm { + .syntax--markup { + -webkit-font-smoothing: auto; + } + + .syntax--link .syntax--entity { + color: @cyan; + } +} diff --git a/packages/base16-tomorrow-dark-theme/styles/syntax/cs.less b/packages/base16-tomorrow-dark-theme/styles/syntax/cs.less new file mode 100644 index 00000000000..aa37fee4dc7 --- /dev/null +++ b/packages/base16-tomorrow-dark-theme/styles/syntax/cs.less @@ -0,0 +1,5 @@ +.syntax--source.syntax--cs { + .syntax--keyword.syntax--operator { + color: @purple; + } +} diff --git a/packages/base16-tomorrow-dark-theme/styles/syntax/json.less b/packages/base16-tomorrow-dark-theme/styles/syntax/json.less new file mode 100644 index 00000000000..9d451633fb8 --- /dev/null +++ b/packages/base16-tomorrow-dark-theme/styles/syntax/json.less @@ -0,0 +1,21 @@ +.syntax--source.syntax--json { + .syntax--meta.syntax--structure.syntax--dictionary.syntax--json { + & > .syntax--string.syntax--quoted.syntax--json { + & > .syntax--punctuation.syntax--string { + color: @red; + } + color: @red; + } + } + + .syntax--meta.syntax--structure.syntax--dictionary.syntax--json, .syntax--meta.syntax--structure.syntax--array.syntax--json { + & > .syntax--value.syntax--json > .syntax--string.syntax--quoted.syntax--json, + & > .syntax--value.syntax--json > .syntax--string.syntax--quoted.syntax--json > .syntax--punctuation { + color: @green; + } + + & > .syntax--constant.syntax--language.syntax--json { + color: @cyan; + } + } +}