From ff696355ee8793be6cb7fe8b9953f6780a42f2f4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 6 Dec 2013 09:45:40 -0800 Subject: [PATCH 1/9] Use color variables for commit message files --- static/editor.less | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/static/editor.less b/static/editor.less index a7204eb70..da66bc03f 100644 --- a/static/editor.less +++ b/static/editor.less @@ -11,6 +11,22 @@ z-index: 0; font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier; line-height: 1.3; + + .markup { + &.git-commit { + &.changed { + color: @text-color-warning; + } + + &.deleted { + color: @text-color-error; + } + + &.inserted { + color: @text-color-info; + } + } + } } .editor .gutter .line-number.cursor-line { From 80552675d0006d977f1c5fac87c98e8b2e30f067 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 6 Dec 2013 11:31:17 -0800 Subject: [PATCH 2/9] Add initial syntax-variables.less --- static/variables/syntax-variables.less | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 static/variables/syntax-variables.less diff --git a/static/variables/syntax-variables.less b/static/variables/syntax-variables.less new file mode 100644 index 000000000..16154c891 --- /dev/null +++ b/static/variables/syntax-variables.less @@ -0,0 +1,8 @@ +// This file has fallback variables. It specifies the syntax variables that +// themes must implement. + +// Colors + +@syntax-color-added: #00f; +@syntax-color-modified: #0f0; +@syntax-color-removed: #f00; From 29d1b42d0485c65089b9f7271cfaaab701c1e84f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 6 Dec 2013 11:37:39 -0800 Subject: [PATCH 3/9] Move git markup styles to syntax.less --- static/editor.less | 16 ---------------- static/syntax.less | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 16 deletions(-) create mode 100644 static/syntax.less diff --git a/static/editor.less b/static/editor.less index da66bc03f..a7204eb70 100644 --- a/static/editor.less +++ b/static/editor.less @@ -11,22 +11,6 @@ z-index: 0; font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier; line-height: 1.3; - - .markup { - &.git-commit { - &.changed { - color: @text-color-warning; - } - - &.deleted { - color: @text-color-error; - } - - &.inserted { - color: @text-color-info; - } - } - } } .editor .gutter .line-number.cursor-line { diff --git a/static/syntax.less b/static/syntax.less new file mode 100644 index 000000000..ca9708b16 --- /dev/null +++ b/static/syntax.less @@ -0,0 +1,21 @@ +@import "ui-variables"; + +.editor { + .lines { + .markup { + &.git-commit { + &.changed { + color: @syntax-color-modified; + } + + &.deleted { + color: @syntax-color-removed; + } + + &.inserted { + color: @syntax-color-added; + } + } + } + } +} From 3a7049a1d9b7ce95cdeee2163c1a4025917eb161 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 6 Dec 2013 11:38:10 -0800 Subject: [PATCH 4/9] Import syntax in atom.less --- static/atom.less | 1 + 1 file changed, 1 insertion(+) diff --git a/static/atom.less b/static/atom.less index 695292b6d..b5c6ae868 100644 --- a/static/atom.less +++ b/static/atom.less @@ -19,5 +19,6 @@ @import "markdown"; @import "editor"; @import "select-list"; +@import "syntax"; @import "utilities"; @import "octicons"; From f60856eca7412efb994fac0c5c7ce0005896c266 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 6 Dec 2013 11:40:31 -0800 Subject: [PATCH 5/9] Add more syntax variables --- static/syntax.less | 2 +- static/variables/syntax-variables.less | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/static/syntax.less b/static/syntax.less index ca9708b16..ffae437bd 100644 --- a/static/syntax.less +++ b/static/syntax.less @@ -1,4 +1,4 @@ -@import "ui-variables"; +@import "syntax-variables"; .editor { .lines { diff --git a/static/variables/syntax-variables.less b/static/variables/syntax-variables.less index 16154c891..316a51cfe 100644 --- a/static/variables/syntax-variables.less +++ b/static/variables/syntax-variables.less @@ -3,6 +3,11 @@ // Colors +@syntax-background-color: #fff; +@syntax-text-color: #333; + @syntax-color-added: #00f; +@syntax-color-ignored: #333; @syntax-color-modified: #0f0; +@syntax-color-renamed: #333; @syntax-color-removed: #f00; From d75d3b6d097999e50909349adece5efdfb67e745 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 6 Dec 2013 11:58:55 -0800 Subject: [PATCH 6/9] Import syntax-variables in atom.less --- static/atom.less | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/atom.less b/static/atom.less index b5c6ae868..8a5075d64 100644 --- a/static/atom.less +++ b/static/atom.less @@ -1,5 +1,9 @@ -// Import from the theme's variables with a fallback to /static/variables/ui-variables.less +// Import from the syntax theme's variables with a fallback to ./variables/syntax-variables.less +@import "syntax-variables"; + +// Import from the ui theme's variables with a fallback to ./variables/ui-variables.less @import "ui-variables"; + @import "octicon-utf-codes"; @import "octicon-mixins"; From 1aa96fc37a71bf63aa3b69a509e4efcfaad8507d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 6 Dec 2013 12:04:16 -0800 Subject: [PATCH 7/9] Drop text segment from color --- static/variables/syntax-variables.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/variables/syntax-variables.less b/static/variables/syntax-variables.less index 316a51cfe..e136f44e0 100644 --- a/static/variables/syntax-variables.less +++ b/static/variables/syntax-variables.less @@ -4,7 +4,7 @@ // Colors @syntax-background-color: #fff; -@syntax-text-color: #333; +@syntax-color: #333; @syntax-color-added: #00f; @syntax-color-ignored: #333; From 9183d4968f04d2fc76134d437fdd17aa7f41a7d4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 6 Dec 2013 12:30:22 -0800 Subject: [PATCH 8/9] Only include used colors for now --- static/variables/syntax-variables.less | 5 ----- 1 file changed, 5 deletions(-) diff --git a/static/variables/syntax-variables.less b/static/variables/syntax-variables.less index e136f44e0..16154c891 100644 --- a/static/variables/syntax-variables.less +++ b/static/variables/syntax-variables.less @@ -3,11 +3,6 @@ // Colors -@syntax-background-color: #fff; -@syntax-color: #333; - @syntax-color-added: #00f; -@syntax-color-ignored: #333; @syntax-color-modified: #0f0; -@syntax-color-renamed: #333; @syntax-color-removed: #f00; From e3b89aca932400baa3190a0137c57eedd5ff5de1 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 6 Dec 2013 12:30:39 -0800 Subject: [PATCH 9/9] Use defaults similar to ui-variables colors --- static/variables/syntax-variables.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/variables/syntax-variables.less b/static/variables/syntax-variables.less index 16154c891..fb6895405 100644 --- a/static/variables/syntax-variables.less +++ b/static/variables/syntax-variables.less @@ -3,6 +3,6 @@ // Colors -@syntax-color-added: #00f; -@syntax-color-modified: #0f0; -@syntax-color-removed: #f00; +@syntax-color-added: #5293d8; +@syntax-color-modified: #f78a46; +@syntax-color-removed: #c00;