Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit b2fdb16

Browse files
committed
Merge pull request #8529 from adobe/dangoor/inline-styling
Dark UI theme for inline editors
2 parents 3bf0341 + 80c5180 commit b2fdb16

File tree

17 files changed

+459
-58
lines changed

17 files changed

+459
-58
lines changed

src/extensions/default/DarkTheme/main.less

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
/* Define some variables used in multiple places */
5252
@background: #1d1f21;
53-
@foreground: #c5c8c6;
53+
@foreground: #ddd;
5454
@bc-color-step-size: 10%;
5555

5656
/* Code Styling */
@@ -104,8 +104,8 @@
104104
border-right: none;
105105
}
106106

107-
.CodeMirror-focused .CodeMirror-activeline .CodeMirror-gutter-elt, .CodeMirror-linenumber {
108-
color: #767676;
107+
.CodeMirror-focused .CodeMirror-activeline .CodeMirror-gutter-elt {
108+
color: #fff;
109109
}
110110

111111
.CodeMirror .CodeMirror-selected {
@@ -136,3 +136,14 @@
136136
.inline-widget .CodeMirror, .inline-widget .CodeMirror-gutters {
137137
background: transparent;
138138
}
139+
140+
/* Non-editor styling */
141+
142+
#image-holder,
143+
#not-editor {
144+
background-color: @background;
145+
}
146+
147+
#image-holder {
148+
color: @foreground;
149+
}

src/extensions/default/DarkTheme/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "Dark",
2+
"title": "Brackets Dark",
33
"name": "dark-theme",
44
"description": "Built-in dark theme for Brackets",
55
"version": "0.42.0",

src/extensions/default/InlineColorEditor/css/main.css renamed to src/extensions/default/InlineColorEditor/css/main.less

Lines changed: 127 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@
5151
width: 88px;
5252
margin-right: 9px;
5353
display: inline-block;
54-
box-shadow: 0 1px 0 #fff;
5554
position: relative;
55+
overflow: hidden;
56+
-webkit-background-clip: padding-box;
57+
background-clip: padding-box;
5658
}
5759
.color-editor aside header .large-swatch {
5860
width: 50%;
@@ -120,7 +122,6 @@
120122
width: 100%;
121123
height: 100%;
122124
border-radius: 3px;
123-
border-bottom: 1px solid #fff;
124125
box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
125126
}
126127
.color-editor section .color-selection-field {
@@ -315,9 +316,10 @@
315316
border-bottom-right-radius: 3px;
316317
}
317318
.color-editor .button-bar li.selected a {
318-
background-color: #d3d7d7;
319+
background-color: #e0f0fa;
319320
box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.06);
320321
background-image: none;
322+
color: #0083e8;
321323
}
322324
.color-editor .button-bar li.disabled a {
323325
cursor: default;
@@ -327,4 +329,126 @@
327329

328330
.color-editor .platform-mac .CodeMirror {
329331
font-family: "SourceSansPro" !important;
332+
}
333+
334+
// Dark UI theme
335+
336+
@dark-bc-bg-highlight: #1671db;
337+
@dark-bc-highlight: rgba(255, 255, 255, 0.06);
338+
@dark-bc-text: #ddd;
339+
@dark-bc-text-alt: #fff;
340+
@dark-bc-highlight-hard: rgba(255, 255, 255, 0.1);
341+
@dark-bc-btn-bg: #3f3f3f;
342+
@dark-bc-btn-border: #202020;
343+
@dark-bc-btn-border-focused: #2893ef;
344+
@dark-bc-btn-border-focused-glow: transparent;
345+
@dark-bc-shadow: rgba(0, 0, 0, 0.24);
346+
@dark-bc-shadow-small: rgba(0, 0, 0, 0.06);
347+
@dark-bc-shadow-medium: rgba(0, 0, 0, 0.12);
348+
@dark-bc-input-bg: #555;
349+
350+
@dark-swatch-bg: url("../img/color_thumb_back_dark.png");
351+
@dark-swatch-bg-2x: url("../img/color_thumb_back_dark@2x.png");
352+
353+
.dark {
354+
.color-editor aside header .large-swatches,
355+
.color-editor aside ul.swatches li .swatch-bg,
356+
.color-editor section .slider.opacity-slider {
357+
background-image: @dark-swatch-bg;
358+
}
359+
360+
.color-editor ul.swatches li .value {
361+
color: @dark-bc-text;
362+
}
363+
364+
.color-editor section .gradient-overlay {
365+
box-shadow: 0 1px 0 @dark-bc-highlight, inset 0 1px 0 @dark-bc-shadow-medium;
366+
}
367+
368+
.color-editor aside ul.swatches li .swatch-bg .swatch {
369+
box-shadow: 0 -1px 1px @dark-bc-shadow-small;
370+
}
371+
372+
.color-editor aside ul.swatches li:focus {
373+
outline: 1px solid @dark-bc-btn-border-focused;
374+
box-shadow: 0 0 0 1px @dark-bc-btn-border-focused-glow;
375+
}
376+
377+
.color-editor section .color-selection-field .selector-base {
378+
color: @dark-bc-input-bg;
379+
}
380+
381+
.color-editor section .color-selection-field .selector-base:focus {
382+
box-shadow: 0 0 0 5px @dark-bc-btn-border-focused-glow;
383+
}
384+
385+
.color-editor section .slider {
386+
border-bottom: 1px solid @dark-bc-highlight-hard;
387+
box-shadow: 0 -1px 0 @dark-bc-shadow-small;
388+
background-color: @dark-bc-highlight-hard;
389+
box-shadow: 0 1px 0 @dark-bc-highlight-hard, inset 0 1px 0 @dark-bc-shadow;
390+
}
391+
392+
.color-editor section .slider .selector-base:focus {
393+
box-shadow: 0 0 0 5px @dark-bc-btn-border-focused-glow;
394+
}
395+
396+
.color-editor section footer .color-value {
397+
border-color: @dark-bc-btn-border;
398+
color: @dark-bc-text;
399+
}
400+
401+
.color-editor section footer input {
402+
border: 1px solid @dark-bc-btn-border;
403+
box-shadow: inset 0 1px 0 @dark-bc-shadow-small;
404+
background: @dark-bc-input-bg;
405+
color: @dark-bc-text;
406+
}
407+
408+
.color-editor section footer input:focus {
409+
background: @dark-bc-input-bg;
410+
box-shadow: 0 0 0 1px @dark-bc-btn-border-focused-glow;
411+
border: 1px solid @dark-bc-btn-border-focused;
412+
}
413+
414+
.color-editor .button-bar a {
415+
color: @dark-bc-text;
416+
text-shadow: 0 1px 0 @dark-bc-highlight;
417+
background-color: @dark-bc-btn-bg;
418+
border: 1px solid @dark-bc-btn-border;
419+
border-right: 1px solid transparent;
420+
box-shadow: inset 0 1px 0 @dark-bc-highlight;
421+
}
422+
423+
.color-editor .button-bar a:focus, .color-editor .button-bar li.selected a:focus {
424+
border: 1px solid @dark-bc-btn-border-focused;
425+
border-right: 1px solid @dark-bc-btn-border-focused !important; /* we need this !important, sorry! */
426+
box-shadow: 0 0 0 1px @dark-bc-btn-border-focused-glow;
427+
}
428+
429+
.color-editor .button-bar li:last-child a {
430+
border-right: 1px solid @dark-bc-btn-border;
431+
}
432+
433+
.color-editor .button-bar li.selected a {
434+
background-color: @dark-bc-bg-highlight;
435+
box-shadow: inset 0 1px 0 @dark-bc-shadow-small;
436+
color: @dark-bc-text-alt;
437+
}
438+
}
439+
440+
@media all and (-webkit-min-device-pixel-ratio : 2), (min-device-pixel-ratio : 2) {
441+
.dark {
442+
.color-editor aside header .large-swatches {
443+
background-image: @dark-swatch-bg-2x;
444+
}
445+
446+
.color-editor aside ul.swatches li .swatch-bg {
447+
background-image: @dark-swatch-bg-2x;
448+
}
449+
450+
.color-editor section .slider.opacity-slider {
451+
background-image: @dark-swatch-bg-2x;
452+
}
453+
}
330454
}
1.02 KB
Loading
1.02 KB
Loading

src/extensions/default/InlineColorEditor/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ define(function (require, exports, module) {
111111

112112

113113
// Initialize extension
114-
ExtensionUtils.loadStyleSheet(module, "css/main.css");
114+
ExtensionUtils.loadStyleSheet(module, "css/main.less");
115115

116116
EditorManager.registerInlineEditProvider(inlineColorEditorProvider);
117117

src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ define(function (require, exports, module) {
160160
setting;
161161

162162
var defaultSettings = {
163-
handleTimingFunction: "#1461FC",
163+
handleTimingFunction: "#2893ef",
164164
handleThickness: 0.008,
165165
vBorderThickness: 0.02,
166166
hBorderThickness: 0.01,
167-
bezierTimingFunction: "#1461FC",
167+
bezierTimingFunction: "#2893ef",
168168
bezierThickness: 0.03
169169
};
170170

src/extensions/default/InlineTimingFunctionEditor/StepEditor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ define(function (require, exports, module) {
170170
p = [];
171171

172172
var defaultSettings = {
173-
bgColor: "#fff",
173+
bgColor: "transparent",
174174
borderColor: "#bbb",
175-
stepColor: "#1461fc",
175+
stepColor: "#2893ef",
176176
dashColor: "#b8b8b8",
177177
borderWidth: 0.00667,
178178
stepLineWidth: 0.02,
1.13 KB
Loading

src/extensions/default/InlineTimingFunctionEditor/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ define(function (require, exports, module) {
155155
*/
156156
function init() {
157157
// Load our stylesheet
158-
ExtensionUtils.loadStyleSheet(module, "main.css");
158+
ExtensionUtils.loadStyleSheet(module, "main.less");
159159
ExtensionUtils.addEmbeddedStyleSheet(Mustache.render(Localized, Strings));
160160

161161
EditorManager.registerInlineEditProvider(inlineTimingFunctionEditorProvider);

0 commit comments

Comments
 (0)