From ad0ea13942fe2f9a17d89e0a066d169576a677a2 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Thu, 3 Sep 2015 13:04:55 -0700 Subject: [PATCH 1/7] Add white-cursor Less mixin for use in dark syntax themes Applies to #1654 --- static/atom.less | 1 + static/white-cursor.less | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 static/white-cursor.less diff --git a/static/atom.less b/static/atom.less index 1acb0f54b..3e8dd181a 100644 --- a/static/atom.less +++ b/static/atom.less @@ -28,3 +28,4 @@ @import "text"; @import "utilities"; @import "octicons"; +@import "white-cursor"; diff --git a/static/white-cursor.less b/static/white-cursor.less new file mode 100644 index 000000000..1c1b95b6d --- /dev/null +++ b/static/white-cursor.less @@ -0,0 +1,6 @@ +@ibeam-1x: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII='); +@ibeam-2x: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC'); + +.white-cursor-image { + cursor: -webkit-image-set(@ibeam-1x 1x, @ibeam-2x 2x) 5 8, text; +} From 2585e691e0f72ec728a143945796b356dc947ec9 Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 4 Sep 2015 16:07:38 +0900 Subject: [PATCH 2/7] Don't output the white-cursor mixin --- static/white-cursor.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/white-cursor.less b/static/white-cursor.less index 1c1b95b6d..91110571f 100644 --- a/static/white-cursor.less +++ b/static/white-cursor.less @@ -1,6 +1,6 @@ @ibeam-1x: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII='); @ibeam-2x: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC'); -.white-cursor-image { +.white-cursor-image() { cursor: -webkit-image-set(@ibeam-1x 1x, @ibeam-2x 2x) 5 8, text; } From 0ab52b654ebda1c3d01c5dc56fb799be58146070 Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 4 Sep 2015 16:08:54 +0900 Subject: [PATCH 3/7] Use white-cursor on dark editors --- static/white-cursor.less | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/static/white-cursor.less b/static/white-cursor.less index 91110571f..1b3a2415d 100644 --- a/static/white-cursor.less +++ b/static/white-cursor.less @@ -4,3 +4,17 @@ .white-cursor-image() { cursor: -webkit-image-set(@ibeam-1x 1x, @ibeam-2x 2x) 5 8, text; } + +// Editors +& when ( lightness(@syntax-background-color) < 50% ) { + .platform-darwin atom-text-editor:not([mini])::shadow .editor-contents--private { + .white-cursor-image(); + } +} + +// Mini Editors +& when ( lightness(@input-background-color) < 50% ) { + .platform-darwin atom-text-editor[mini]::shadow .editor-contents--private { + .white-cursor-image(); + } +} From fd4e0e6e694977c8a351e5b1c5173c002ad3e62c Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Fri, 4 Sep 2015 07:59:45 -0700 Subject: [PATCH 4/7] Change name of white cursor mixin --- static/{white-cursor.less => cursors.less} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename static/{white-cursor.less => cursors.less} (92%) diff --git a/static/white-cursor.less b/static/cursors.less similarity index 92% rename from static/white-cursor.less rename to static/cursors.less index 1b3a2415d..7249befee 100644 --- a/static/white-cursor.less +++ b/static/cursors.less @@ -1,20 +1,20 @@ @ibeam-1x: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII='); @ibeam-2x: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC'); -.white-cursor-image() { +.cursor-white() { cursor: -webkit-image-set(@ibeam-1x 1x, @ibeam-2x 2x) 5 8, text; } // Editors & when ( lightness(@syntax-background-color) < 50% ) { .platform-darwin atom-text-editor:not([mini])::shadow .editor-contents--private { - .white-cursor-image(); + .cursor-white(); } } // Mini Editors & when ( lightness(@input-background-color) < 50% ) { .platform-darwin atom-text-editor[mini]::shadow .editor-contents--private { - .white-cursor-image(); + .cursor-white(); } } From 0e1cca6a4d613fbc5d8c94acbee70780e5dc3f28 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Fri, 4 Sep 2015 08:03:30 -0700 Subject: [PATCH 5/7] Update import file for new cursor file name --- static/atom.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/atom.less b/static/atom.less index 3e8dd181a..c2c91dac7 100644 --- a/static/atom.less +++ b/static/atom.less @@ -28,4 +28,4 @@ @import "text"; @import "utilities"; @import "octicons"; -@import "white-cursor"; +@import "cursorsr"; From ad952814ac948be48bacd2014870a44ed3b7df5f Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Tue, 8 Sep 2015 12:21:26 -0700 Subject: [PATCH 6/7] Fix bad import name --- static/atom.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/atom.less b/static/atom.less index c2c91dac7..7a2384514 100644 --- a/static/atom.less +++ b/static/atom.less @@ -28,4 +28,4 @@ @import "text"; @import "utilities"; @import "octicons"; -@import "cursorsr"; +@import "cursors"; From 0c623401d63bc179ab4898ae59cdb1b553991817 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Sat, 12 Sep 2015 03:48:04 -0700 Subject: [PATCH 7/7] Add imports to prevent build failure --- static/cursors.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static/cursors.less b/static/cursors.less index 7249befee..b2807217e 100644 --- a/static/cursors.less +++ b/static/cursors.less @@ -1,3 +1,9 @@ +@import "./variables/syntax-variables"; +@import "syntax-variables"; + +@import "./variables/ui-variables"; +@import "ui-variables"; + @ibeam-1x: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII='); @ibeam-2x: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC');