DBuit / Homekit-panel-card

Homekit panel card for home assistant
MIT License
304 stars 54 forks source link

Problem with 2 tiles on weather card #80

Closed jimmyhawkin closed 4 years ago

jimmyhawkin commented 4 years ago

Problem im experiancing with latest HA and Card is that tiles wider then 2 start having wrong placement. I saw others on the forum with the same problem with weather card.

              - card: weather-forecast
                cardOptions:
                  entity: weather.smhi_hemma
                cardStyle: |
                  ha-card {
                      padding: 5px!important;
                      display: flex!important;
                      flex-direction: column!important;
                      background: transparent!important;
                      box-shadow: none!important;
                      border-radius:0!important;
                  }
                  .content {
                     display: flex!important;
                      flex-direction: row!important;
                  }
                  .icon-image {
                      min-width: auto!important;
                  }
                  .icon-image > * {
                      height: 32px!important;
                      flex: 0 0 32px!important;
                  }
                  .info .name-state {
                      font-weight: 500;
                  }
                  .info .name-state .state {
                      font-size:14px!important;
                      text-align:right;
                  }
                  .info .name-state .name {
                      font-size:14px!important;
                  }
                  .info .temp-attribute {
                      width:100%;
                      font-weight: 500;
                  }
                  .info .temp-attribute .temp {
                          font-size: 16px!important;
                  }
                  .info .temp-attribute .temp span {
                          font-size: 14px!important;
                  }
                  .forecast {
                      font-size: 10px!important;
                      padding-top: 5px!important;
                  }
                  .forecast-image-icon {
                      padding:0!important;
                  }
                  .forecast-image-icon > * {
                      width:20px!important;
                      height:20px!important;
                      margin: 0 auto!important;
                  }
                  .forecast .temp {
                      margin-top:0!important;
                      font-size:12px!important;
                  }
                  .forecast .templow {
                      display:none;
                  }
                noPadding: true
                wider: true
                widersize: 2

U might have seen the problem already. i supply my code and under is how it displaced itself now with latest version of both Homeassistant and Homekit card It allso happens only on my pc so far. Cleard Cashe and all but its still there on pc. did the same on iphone but then the problem is not there. Im using chrome.

1701a83482a9fc384d8b21b84755aee440aece95

On mobile phone its not displaced

83b922a50baca2a398d4d7f51c5413ae652afc0e_2_230x500

So i think it has something to do with the style code or code under together. sins when you change with and height from 90x90 to 100x100 the problem start on the phone aswell.

style: |
  :host {
    --tile-background: rgba(10, 10, 10, 0.22);
    --tile-border-radius: 12px;
    --tile-width: 100px;
    --tile-height: 100px;
    --tile-on-background: var(--card-background-color);

    --tile-name-text-color: var(--disabled-text-color);
    --tile-on-name-text-color: var(--primary-text-color);

    --tile-state-text-color: var(--disabled-text-color);
    --tile-on-state-text-color: var(--paper-item-icon-active-color);

    --tile-state-changed-text-color: var(--primary-text-color);
    --tile-unavailable-state-text-color: rgba(255, 0, 0, 1);

    --tile-value-text-color: var(--primary-text-color);

    --tile-icon-color: var(--disabled-text-color);
    --tile-on-icon-color: var(--paper-item-icon-active-color);

    --tile-width-mobile: 90px;
    --tile-height-mobile: 90px;

    --tile-icon-size: 30px;
    --tile-padding-top: 0
    --tile-image-radius: 0;
    } 
    .icon.image {
          position: absolut

Ive tried other weather card codes that are 2 tiles and get the same result.

jimmyhawkin commented 4 years ago

Solved now with your latest update released now.