bbbenji / synthwave-hass

Synthwave inspired theme for Home Assistant
MIT License
154 stars 24 forks source link

Labels in entity cards are barely readable #3

Closed TheLastProject closed 4 years ago

TheLastProject commented 5 years ago

image

entities:
  - entity: input_boolean.sleep_mode
  - label: When activated
    type: section
  - entity: automation.lights_off_for_sleep_mode
    icon: 'mdi:lightbulb'
    name: Lights off
  - label: When disabled
    type: section
  - entity: automation.lights_on_for_end_of_sleep_mode
    icon: 'mdi:lightbulb'
    name: Lights on
show_header_toggle: false
title: Sleep mode
type: entities

Note: I don't have the JavaScript running because I installed it into HCAS, could very well be that JavaScript code fixes it, but I figured I'd make the issue anyway because it'd be neat if an install in HCAS directly makes it work super perfectly, because wow this theme is pretty.

bbbenji commented 5 years ago

The extras package is now installable via HACS. It was merged into the default repos list so it should show up soon by default. Or add the repo manually: https://github.com/bbbenji/synthwave-hass-extras

At the moment it doesn't do much, but I'm working on expanding it to fix Home Assistant's theming shortcomings. (Like this issue).

bbbenji commented 5 years ago

Check out the latest extras commit: https://github.com/bbbenji/synthwave-hass-extras/commit/ba28f11e5bd7728b537624ae3cf5bacd6a6c16d3. It should make entity-card labels white. However, it only works on the first page that is loaded. So if you have an entity-card with a label on a secondary page, you'll have to navigate to that page, then refresh from there for the styling to be applied.

TheLastProject commented 5 years ago

Wouldn't you rather just insert CSS into the webpage? Then it'll also be applied to objects not loaded (yet): https://stackoverflow.com/a/707580

bbbenji commented 5 years ago

That won't work because of ShadowRoot. And an entity-card's label is nested at least 7 times. If it did work, it would make theming much easier.

bbbenji commented 4 years ago

Fixed. Please update to latest https://github.com/bbbenji/synthwave-hass & https://github.com/bbbenji/synthwave-hass-extras and let me know. I will reopen this issue if you still have the problem.