Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Background color of body doesn't turn dark when importing components on demand #208

@Creedowl

Description

@Creedowl

Bug report 🐞

I import components in the following way:

import Vue from 'vue'
import Button from '@zeit-ui/vue/lib/button.common'

import '@zeit-ui/themes/index.css'
import '@zeit-ui/themes/dark.css'
import '@zeit-ui/vue/lib/button.css'

Button.install(Vue)

It works well, but when I try to swtich theme to dark:

import ZeitUI from '@zeit-ui/vue'

ZeitUI.theme.enableDark()

Only the Button turn to dark, but the body's background color is still white. When I change to import 'zeit-ui.css'

import Vue from 'vue'
import Button from '@zeit-ui/vue/lib/button.common'

import '@zeit-ui/vue/dist/zeit-ui.css'
import '@zeit-ui/vue/lib/button.css'

Button.install(Vue)

Everything works well

Version & Environment

"@zeit-ui/vue": "^2.5.0-canary.3" with "nuxt": "^2.13.0"

Expection

Background color of body doesn't turn dark when importing components on demand

Actual results (or Errors)

As described above. I found that when I import 'zeit-ui.css', there is such a css

image

But that doesn't exist when I use the first way

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions