Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applies a dark theme, based on a global class #243

Merged
merged 5 commits into from
Feb 15, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Applies a dark theme, based on a global class
  • Loading branch information
jhoff committed Feb 3, 2017
commit 5d440e84967ecc341cd5a0f1d466943e166baebf
14 changes: 11 additions & 3 deletions src/devtools/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<style lang="stylus" src="./global.styl"></style>

<template>
<div id="app" class="app">
<div id="app" :class="{ app: true, dark: true }">
<div class="header">
<img class="logo" src="./assets/logo.png" alt="Vue">
<span class="message-container">
Expand Down Expand Up @@ -102,11 +102,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
Expand All @@ -115,6 +117,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
Expand All @@ -137,9 +141,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
Expand Down Expand Up @@ -186,6 +192,8 @@ $event-count-bubble-size = 18px
position absolute
right 0
top 12px
.app.dark &
background-color $dark-background-color

.active-bar
position absolute
Expand Down
15 changes: 12 additions & 3 deletions src/devtools/common.styl
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
2 changes: 2 additions & 0 deletions src/devtools/components/ActionHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/devtools/components/DataField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default {
&.literal
color #0033cc
.type
color #fff
color $background-color
padding 3px 6px
font-size 10px
line-height 10px
Expand Down Expand Up @@ -199,11 +199,13 @@ export default {
border 1px solid #e3e3e3
border-radius 3px
padding 8px 12px
background-color #fff
background-color $background-color
line-height 16px
box-shadow 0 2px 12px rgba(0,0,0,.1)
.key
width 90px
.app.dark &
background-color $dark-background-color
.meta-field
display block

Expand Down
6 changes: 6 additions & 0 deletions src/devtools/components/ScrollPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ export default {
.scroll
flex 1
overflow overlay
.app.dark &::-webkit-scrollbar
background: $dark-background-color
border-left: 1px solid $dark-border-color
.app.dark &::-webkit-scrollbar-thumb
background: lighten($dark-background-color, 7%);
border: 1px solid lighten($dark-border-color, 7%)

// Keeping this here in case `overflow: overlay`
// doesn't float everyone's boat.
Expand Down
2 changes: 2 additions & 0 deletions src/devtools/components/SplitPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export default {

.left
border-right 1px solid $border-color
.app.dark &
border-right 1px solid $dark-border-color

.dragger
position absolute
Expand Down
4 changes: 3 additions & 1 deletion src/devtools/views/components/ComponentInstance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default {
position relative
overflow hidden
z-index 2
background-color #fff
background-color $background-color
transition background-color .1s ease
border-radius 3px
font-size 14px
Expand All @@ -129,6 +129,8 @@ export default {
border-left-color #fff
.instance-name
color #fff
.app.dark &
background-color $dark-background-color

.children
position relative
Expand Down
2 changes: 2 additions & 0 deletions src/devtools/views/events/EventInspector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export default {

section:not(:last-child)
border-bottom 1px solid $border-color
.app.dark &
border-bottom 1px solid $dark-border-color

.component-name
margin 0 10px
Expand Down
4 changes: 3 additions & 1 deletion src/devtools/views/events/EventsHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default {
cursor pointer
padding 10px 20px
font-size 12px
background-color #fff
background-color $background-color
box-shadow 0 1px 5px rgba(0,0,0,.12)
.event-name
font-weight 600
Expand All @@ -115,6 +115,8 @@ export default {
color: #fff
.event-source
color #ddd
.app.dark &
background-color $dark-background-color

.time
font-size 11px
Expand Down
4 changes: 3 additions & 1 deletion src/devtools/views/vuex/VuexHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ $inspected_color = #af90d5
cursor pointer
padding 10px 20px
font-size 12px
background-color #fff
background-color $background-color
box-shadow 0 1px 5px rgba(0,0,0,.12)
height 40px
&.active
Expand Down Expand Up @@ -179,6 +179,8 @@ $inspected_color = #af90d5
&:hover
.entry-actions
display inline-block
.app.dark &
background-color $dark-background-color

.action
color #999
Expand Down
13 changes: 11 additions & 2 deletions src/devtools/views/vuex/VuexStateInspector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ function copyToClipboard (state) {
top 1px
font-size 12px
color #c41a16
background-color #fff
background-color $background-color
.app.dark &
background-color $dark-background-color

.import-state
transition all .3s ease
Expand All @@ -144,7 +146,11 @@ function copyToClipboard (state) {
box-shadow 4px 4px 6px 0 $border-color
border 1px solid $border-color
padding 3px
background-color #fff
background-color $background-color
.app.dark &
background-color $dark-background-color
box-shadow 4px 4px 6px 0 $dark-border-color
border 1px solid $dark-border-color

textarea
width 100%
Expand All @@ -153,4 +159,7 @@ function copyToClipboard (state) {
outline none
border none
resize vertical
.app.dark &
color #DDD
background-color $dark-background-color
</style>