Polymer / pwa-starter-kit

Starter templates for building full-featured Progressive Web Apps from web components.
https://pwa-starter-kit.polymer-project.org
2.36k stars 431 forks source link

Theming example not working or missing a step #388

Closed ttmms closed 4 years ago

ttmms commented 4 years ago

I did

:host {
  /* This is the default, light theme */
  --app-primary-color: red;
  --app-secondary-color: black;
  --app-text-color: var(--app-secondary-color);
  --app-header-background-color: white;
  --app-header-text-color: var(--app-text-color);
}

:host.dark-theme {
  /* This is the dark theme */
  --app-primary-color: yellow;
  --app-secondary-color: white;
  --app-text-color: var(--app-secondary-color);
  --app-header-background-color: black;
  --app-header-text-color: var(--app-text-color);
}

in my-app.js and added <my-app appTitle="My App" class="dark-theme"></my-app> in index.html as suggested in https://pwa-starter-kit.polymer-project.org/configuring-and-personalizing#theming but nothing happens. Only style in :host works.

jareksgit commented 4 years ago

Try :host(.dark-theme) { ... }.

stale[bot] commented 4 years ago

This project is no longer under development and will be transitioning to a read-only repo. Thank you for your contributions.