Skip to content

Commit dfd2fd9

Browse files
committed
feat(Dark): Improve dark mixin
1 parent 2df14d6 commit dfd2fd9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/src/pages/style/dark-mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ badge: v1.3+
77
Dark Mode is a supplemental mode that can be used to display mostly dark surfaces on the UI. The design reduces the light emitted by device screens while maintaining the minimum color contrast ratios required for readability.
88

99
The advantages of Dark Mode are that:
10-
* it enhances visual ergonomics by reducing eye strain.
10+
* It enhances visual ergonomics by reducing eye strain.
1111
* Provides comfort of use at night or in dark environments.
1212
* It conserves battery power mainly if the device screen is OLED or AMOLED, thereby enabling device usage for longer periods without charging.
1313

@@ -16,7 +16,7 @@ The advantages of Dark Mode are that:
1616
1. It sets a default dark background for the pages (that you can easily override through CSS with the `body.body--dark` selector)
1717
2. All Quasar components with a `dark` property will have it automatically set to `true`. No need to do it manually.
1818

19-
The auto-detection works by looking at `prefers-color-scheme: dark` media query and it's dynamic. If the client browser/platform switches to/from Dark mode while your app is running, it will also update Quasar's Dark mode (if Dark mode is set to `auto`).
19+
The auto-detection works by looking at `prefers-color-scheme: dark` media query and is dynamic. If the client browser/platform switches to/from Dark mode while your app is running, it will also update Quasar's Dark mode (if Dark mode is set to `auto`).
2020

2121
## How to use it
2222

ui/src/mixins/dark.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export default {
88

99
computed: {
1010
isDark () {
11-
return this.dark === false
12-
? false
13-
: this.$q.dark.isActive === true || this.dark === true
11+
return this.dark === null
12+
? this.$q.dark.isActive
13+
: this.dark
1414
}
1515
}
1616
}

0 commit comments

Comments
 (0)