[wip] darkmode

This commit is contained in:
syuilo
2018-04-20 04:51:04 +09:00
parent 2145730409
commit 5ace37e3db
8 changed files with 106 additions and 77 deletions

View File

@@ -87,7 +87,7 @@ export default Vue.extend({
<style lang="stylus" scoped>
@import '~const.styl'
.mk-switch
root(isDark)
display flex
margin 12px 0
cursor pointer
@@ -121,11 +121,12 @@ export default Vue.extend({
&:hover
> .label
> span
color #2e3338
color isDark ? #fff : #2e3338
> .button
background #ced2da
border-color #ced2da
$color = isDark ? #15181d : #ced2da
background $color
border-color $color
> input
position absolute
@@ -147,14 +148,16 @@ export default Vue.extend({
border-radius 14px
> .button
$color = isDark ? #1c1f25 : #dcdfe6
display inline-block
margin 0
width 40px
min-width 40px
height 20px
min-height 20px
background #dcdfe6
border 1px solid #dcdfe6
background $color
border 1px solid $color
outline none
border-radius 10px
transition inherit
@@ -179,12 +182,18 @@ export default Vue.extend({
> span
display block
line-height 20px
color #4a535a
color isDark ? #c4ccd2 : #4a535a
transition inherit
> p
margin 0
//font-size 90%
color #9daab3
color isDark ? #78858e : #9daab3
.mk-switch[data-darkmode]
root(true)
.mk-switch:not([data-darkmode])
root(false)
</style>

View File

@@ -109,10 +109,10 @@ export default define({
<style lang="stylus" scoped>
@import '~const.styl'
.mkw-calendar
root(isDark)
padding 16px 0
color #777
background #fff
color isDark ? #c5ced6 :#777
background isDark ? #282C37 : #fff
border solid 1px rgba(0, 0, 0, 0.075)
border-radius 6px
@@ -171,7 +171,7 @@ export default define({
margin 0 0 2px 0
font-size 12px
line-height 18px
color #888
color isDark ? #7a8692 : #888
> b
margin-left 2px
@@ -179,7 +179,7 @@ export default define({
> .meter
width 100%
overflow hidden
background #eee
background isDark ? #1c1f25 : #eee
border-radius 8px
> .val
@@ -198,4 +198,10 @@ export default define({
> .meter > .val
background #41ddde
.mkw-calendar[data-darkmode]
root(true)
.mkw-calendar:not([data-darkmode])
root(false)
</style>