diff --git a/src/devtools/App.vue b/src/devtools/App.vue index 79367c8c4..285bc401a 100644 --- a/src/devtools/App.vue +++ b/src/devtools/App.vue @@ -1,7 +1,7 @@ - + @@ -52,6 +52,13 @@ import { mapState } from 'vuex' export default { name: 'app', + data () { + return { + isDark: typeof chrome !== 'undefined' && + typeof chrome.devtools !== 'undefined' && + chrome.devtools.panels.themeName === 'dark' + } + }, components: { components: ComponentsTab, vuex: VuexTab, @@ -102,11 +109,13 @@ export default { width 100% height 100% user-select none - background-color #fff + background-color $background-color display flex flex-direction column h1 color #42b983 + &.dark + background-color $dark-background-color .header display flex @@ -115,6 +124,8 @@ export default { box-shadow 0 0 8px rgba(0, 0, 0, 0.15) font-size 14px position relative + .app.dark & + border-bottom 1px solid $dark-border-color .logo width 30px @@ -137,9 +148,11 @@ export default { cursor pointer position relative border-bottom-color transparent - background-color #fff + background-color $background-color color #888 transition color .35s ease + .app.dark & + background-color $dark-background-color &:hover color #555 @@ -186,6 +199,8 @@ $event-count-bubble-size = 18px position absolute right 0 top 12px + .app.dark & + background-color $dark-background-color .active-bar position absolute diff --git a/src/devtools/common.styl b/src/devtools/common.styl index fb337dc0f..d9b54f50c 100644 --- a/src/devtools/common.styl +++ b/src/devtools/common.styl @@ -1,7 +1,10 @@ // Colors $blue = #44A1FF -$green = #42b983 -$darkerGreen = #3ba776 +$grey = #DDDDDD +$green = #42B983 +$darkerGreen = #3BA776 +$slate = #242424 +$white = #FFFFFF // The min-width to give icons text... $wide = 820px @@ -11,5 +14,11 @@ $tall = 300px // Theme $active-color = $darkerGreen -$border-color = #dddddd +$border-color = $grey +$background-color = $white $component-color = $active-color + +$dark-active-color = $active-color +$dark-border-color = lighten($slate, 10%) +$dark-background-color = $slate +$dark-component-color = $active-color diff --git a/src/devtools/components/ActionHeader.vue b/src/devtools/components/ActionHeader.vue index 11c2906a1..905a5bf4c 100644 --- a/src/devtools/components/ActionHeader.vue +++ b/src/devtools/components/ActionHeader.vue @@ -17,6 +17,8 @@ height 35px @media (min-height: $tall) height 50px + .app.dark & + border-bottom 1px solid $dark-border-color .component-name display flex diff --git a/src/devtools/components/DataField.vue b/src/devtools/components/DataField.vue index f7a593c77..ae6eebafe 100644 --- a/src/devtools/components/DataField.vue +++ b/src/devtools/components/DataField.vue @@ -130,6 +130,8 @@ export default {