Skip to content

Commit 2e1e0a0

Browse files
committed
feat(Dark): q-dark CSS class; $dark and $dark-page variables
1 parent d66ca89 commit 2e1e0a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+57
-143
lines changed

ui/dev/components/components/button-group.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
</q-btn-group>
114114

115115
<div v-for="push in options" :key="push">
116-
<div v-for="flat in options" :key="flat">
116+
<div v-for="flat in options" :key="flat">
117117
<div v-for="outline in options" :key="outline">
118118
<div v-for="rounded in options" :key="rounded">
119119
<div v-for="size in sizes" :key="size" class="q-ma-sm">

ui/dev/components/components/data-table-part3.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<q-toggle v-model="loading" label="Loading" :dark="dark" />
44
<q-toggle v-model="dark" label="Dark" :dark="dark" :false-value="null" />
55
<q-toggle v-model="dense" label="Dense" :dark="dark" />
6-
<q-select class="q-ma-sm inline" filled v-model="separator" :options="['horizontal', 'vertical', 'cell', 'none']" />
7-
<q-toggle v-model="hasSelection" label="Selection" />
6+
<q-select class="q-ma-sm inline" filled v-model="separator" :options="['horizontal', 'vertical', 'cell', 'none']" :dark="dark" />
7+
<q-toggle v-model="hasSelection" label="Selection" :dark="dark" />
88

99
<q-table
1010
:data="data"
@@ -16,8 +16,7 @@
1616
:separator="separator"
1717
:dense="dense"
1818
class="q-my-lg"
19-
:color="dark ? 'amber' : 'primary'"
20-
:card-class="dark ? 'bg-purple text-white' : 'bg-amber text-black'"
19+
:color="$q.dark.isActive || dark ? 'amber' : 'primary'"
2120
:selection="selection"
2221
:selected.sync="selected"
2322
:dark="dark"
@@ -45,7 +44,7 @@
4544
class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3"
4645
:style="props.selected ? 'transform: scale(0.95);' : ''"
4746
>
48-
<q-card :class="dark ? 'bg-grey-9 text-white' : ''">
47+
<q-card :dark="dark">
4948
<q-card-section>
5049
<q-checkbox :dark="dark" v-model="props.selected" :label="props.row.name" />
5150
</q-card-section>

ui/src/components/banner/QBanner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default Vue.extend({
2222
class: {
2323
'q-banner--top-padding': actions !== void 0 && !this.inlineActions,
2424
'q-banner--dense': this.dense,
25-
'q-banner--dark': this.isDark,
25+
'q-banner--dark q-dark': this.isDark,
2626
'rounded-borders': this.rounded
2727
},
2828
on: this.$listeners

ui/src/components/banner/QBanner.sass

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,3 @@
3636
.q-banner__actions
3737
&.col-auto
3838
padding-left: 8px
39-
40-
&--dark
41-
background: $grey-9

ui/src/components/banner/QBanner.styl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,3 @@
3636
.q-banner__actions
3737
&.col-auto
3838
padding-left 8px
39-
40-
&--dark
41-
background $grey-9

ui/src/components/card/QCard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default Vue.extend({
1818
return h('div', {
1919
staticClass: 'q-card',
2020
class: {
21-
'q-card--dark': this.isDark,
21+
'q-card--dark q-dark': this.isDark,
2222
'q-card--bordered': this.bordered,
2323
'q-card--square no-border-radius': this.square,
2424
'q-card--flat no-shadow': this.flat

ui/src/components/card/QCard.sass

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
border: 1px solid $separator-color
3333

3434
&--dark
35-
color: #fff
36-
background: $grey-10
3735
border-color: $separator-dark-color
3836

3937
&__section

ui/src/components/card/QCard.styl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
border 1px solid $separator-color
3333

3434
&--dark
35-
background $grey-9
3635
border-color $separator-dark-color
3736

3837
&__section

ui/src/components/carousel/QCarousel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default Vue.extend({
5252
fullscreen: this.inFullscreen,
5353
'q-carousel--arrows': this.padding === true && this.arrows === true,
5454
'q-carousel--navigation': this.padding === true && this.navigation === true,
55-
'q-carousel--dark': this.isDark
55+
'q-carousel--dark q-dark': this.isDark
5656
}
5757
},
5858

ui/src/components/carousel/QCarousel.sass

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,3 @@
6767

6868
&.fullscreen
6969
height: 100%
70-
71-
&--dark
72-
background: $grey-9

0 commit comments

Comments
 (0)