-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Dark UI theme for inline editors #8529
Changes from all commits
411368b
ab81de0
26b2226
f3e2a74
86648b4
6bac834
955f42e
70869d8
3ed432f
b7bae84
afc9f48
60c921f
53bc3bf
545b7c9
3f93a54
a21df20
4e4303d
8129d6c
93d4674
80c5180
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,8 +51,10 @@ | |
width: 88px; | ||
margin-right: 9px; | ||
display: inline-block; | ||
box-shadow: 0 1px 0 #fff; | ||
position: relative; | ||
overflow: hidden; | ||
-webkit-background-clip: padding-box; | ||
background-clip: padding-box; | ||
} | ||
.color-editor aside header .large-swatch { | ||
width: 50%; | ||
|
@@ -120,7 +122,6 @@ | |
width: 100%; | ||
height: 100%; | ||
border-radius: 3px; | ||
border-bottom: 1px solid #fff; | ||
box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12); | ||
} | ||
.color-editor section .color-selection-field { | ||
|
@@ -315,9 +316,10 @@ | |
border-bottom-right-radius: 3px; | ||
} | ||
.color-editor .button-bar li.selected a { | ||
background-color: #d3d7d7; | ||
background-color: #e0f0fa; | ||
box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.06); | ||
background-image: none; | ||
color: #0083e8; | ||
} | ||
.color-editor .button-bar li.disabled a { | ||
cursor: default; | ||
|
@@ -327,4 +329,126 @@ | |
|
||
.color-editor .platform-mac .CodeMirror { | ||
font-family: "SourceSansPro" !important; | ||
} | ||
|
||
// Dark UI theme | ||
|
||
@dark-bc-bg-highlight: #1671db; | ||
@dark-bc-highlight: rgba(255, 255, 255, 0.06); | ||
@dark-bc-text: #ddd; | ||
@dark-bc-text-alt: #fff; | ||
@dark-bc-highlight-hard: rgba(255, 255, 255, 0.1); | ||
@dark-bc-btn-bg: #3f3f3f; | ||
@dark-bc-btn-border: #202020; | ||
@dark-bc-btn-border-focused: #2893ef; | ||
@dark-bc-btn-border-focused-glow: transparent; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to have a non-transparent color to show the focus ring. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dark theme doesn't use glow on purpose because the focus border is already very bright compared to the light theme. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then you can't tell where the focus is as you tab through the UI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see what you mean now. It's fixed: http://cl.ly/image/2K1Z0V0j2220 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. That's what I want. |
||
@dark-bc-shadow: rgba(0, 0, 0, 0.24); | ||
@dark-bc-shadow-small: rgba(0, 0, 0, 0.06); | ||
@dark-bc-shadow-medium: rgba(0, 0, 0, 0.12); | ||
@dark-bc-input-bg: #555; | ||
|
||
@dark-swatch-bg: url("../img/color_thumb_back_dark.png"); | ||
@dark-swatch-bg-2x: url("../img/color_thumb_back_dark@2x.png"); | ||
|
||
.dark { | ||
.color-editor aside header .large-swatches, | ||
.color-editor aside ul.swatches li .swatch-bg, | ||
.color-editor section .slider.opacity-slider { | ||
background-image: @dark-swatch-bg; | ||
} | ||
|
||
.color-editor ul.swatches li .value { | ||
color: @dark-bc-text; | ||
} | ||
|
||
.color-editor section .gradient-overlay { | ||
box-shadow: 0 1px 0 @dark-bc-highlight, inset 0 1px 0 @dark-bc-shadow-medium; | ||
} | ||
|
||
.color-editor aside ul.swatches li .swatch-bg .swatch { | ||
box-shadow: 0 -1px 1px @dark-bc-shadow-small; | ||
} | ||
|
||
.color-editor aside ul.swatches li:focus { | ||
outline: 1px solid @dark-bc-btn-border-focused; | ||
box-shadow: 0 0 0 1px @dark-bc-btn-border-focused-glow; | ||
} | ||
|
||
.color-editor section .color-selection-field .selector-base { | ||
color: @dark-bc-input-bg; | ||
} | ||
|
||
.color-editor section .color-selection-field .selector-base:focus { | ||
box-shadow: 0 0 0 5px @dark-bc-btn-border-focused-glow; | ||
} | ||
|
||
.color-editor section .slider { | ||
border-bottom: 1px solid @dark-bc-highlight-hard; | ||
box-shadow: 0 -1px 0 @dark-bc-shadow-small; | ||
background-color: @dark-bc-highlight-hard; | ||
box-shadow: 0 1px 0 @dark-bc-highlight-hard, inset 0 1px 0 @dark-bc-shadow; | ||
} | ||
|
||
.color-editor section .slider .selector-base:focus { | ||
box-shadow: 0 0 0 5px @dark-bc-btn-border-focused-glow; | ||
} | ||
|
||
.color-editor section footer .color-value { | ||
border-color: @dark-bc-btn-border; | ||
color: @dark-bc-text; | ||
} | ||
|
||
.color-editor section footer input { | ||
border: 1px solid @dark-bc-btn-border; | ||
box-shadow: inset 0 1px 0 @dark-bc-shadow-small; | ||
background: @dark-bc-input-bg; | ||
color: @dark-bc-text; | ||
} | ||
|
||
.color-editor section footer input:focus { | ||
background: @dark-bc-input-bg; | ||
box-shadow: 0 0 0 1px @dark-bc-btn-border-focused-glow; | ||
border: 1px solid @dark-bc-btn-border-focused; | ||
} | ||
|
||
.color-editor .button-bar a { | ||
color: @dark-bc-text; | ||
text-shadow: 0 1px 0 @dark-bc-highlight; | ||
background-color: @dark-bc-btn-bg; | ||
border: 1px solid @dark-bc-btn-border; | ||
border-right: 1px solid transparent; | ||
box-shadow: inset 0 1px 0 @dark-bc-highlight; | ||
} | ||
|
||
.color-editor .button-bar a:focus, .color-editor .button-bar li.selected a:focus { | ||
border: 1px solid @dark-bc-btn-border-focused; | ||
border-right: 1px solid @dark-bc-btn-border-focused !important; /* we need this !important, sorry! */ | ||
box-shadow: 0 0 0 1px @dark-bc-btn-border-focused-glow; | ||
} | ||
|
||
.color-editor .button-bar li:last-child a { | ||
border-right: 1px solid @dark-bc-btn-border; | ||
} | ||
|
||
.color-editor .button-bar li.selected a { | ||
background-color: @dark-bc-bg-highlight; | ||
box-shadow: inset 0 1px 0 @dark-bc-shadow-small; | ||
color: @dark-bc-text-alt; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the Light Theme, I never noticed this before, but in the radio buttons (RGBa|Hex|HSLa) the selected state looks unselected -- so it looks like 2 selected buttons and 1 unselected button. It's not as noticeable when control has focus because selected button has glow outline, so click on another control and look at unfocused state. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The selected state should be light blue like find options. I've fixed this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @larz0 In light theme, the selected state of text is now light blue, but I was expecting the background to be blue similar to dark theme. Is that intended? |
||
} | ||
|
||
@media all and (-webkit-min-device-pixel-ratio : 2), (min-device-pixel-ratio : 2) { | ||
.dark { | ||
.color-editor aside header .large-swatches { | ||
background-image: @dark-swatch-bg-2x; | ||
} | ||
|
||
.color-editor aside ul.swatches li .swatch-bg { | ||
background-image: @dark-swatch-bg-2x; | ||
} | ||
|
||
.color-editor section .slider.opacity-slider { | ||
background-image: @dark-swatch-bg-2x; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Dark Theme changes the color (tone?) of the transparent white/gray checkerboard. I think this should be the same regardless of Theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about keeping the light grid but they pop out too much on a dark background and it's hard to see transparent colors that way because the brightness grabs all the attention.