wassy92x / lovelace-digital-clock

A custom digital clock card for Home Assistant
MIT License
96 stars 17 forks source link

Support arbitrary CSS styling via config #25

Closed playmobil42 closed 1 year ago

playmobil42 commented 1 year ago

Following the pattern from the the Picture Elements Card link. Add configuration options to allow specifying CSS Styling to each line individually.

This is currently achievable via card-mod, but specifying styling directly makes this card much more convenient to use while lowering the bar for new users.

wassy92x commented 1 year ago

Unfortunatelly I will not merge this, because in my opinion the styling should by done by css-variables. Some styling is configurable by the theme in home assistant. If this is not enough, you can use card-mod with for example the following config:

type: custom:digital-clock
style: |
  span.first-line 
  {
    font-size: 6em;
    margin-bottom:25px;
  }
  span.second-line 
  {
    font-size: 2.5em;
    margin-bottom:15px;
  }