iantrich / restriction-card

🔒 Apply restrictions to Lovelace cards
MIT License
259 stars 22 forks source link

Lock icon height/width options do not work properly with rows #23

Closed Anwen747 closed 4 years ago

Anwen747 commented 4 years ago

Checklist:

Release with the issue: 1.1.9

Last working release (if known): unknown

Browser and Operating System: Chrome on Windows 10 PC. Running HA Supervised 0.106.5 on Ubuntu 18.04 host on a NUC. (Cannot move to 0.107.x until z-wave issues are fixed.)

Google Chrome is up to date Version 80.0.3987.149 (Official Build) (64-bit)

Description of problem:

Changing the lock height/width via my theme does not work. The lock icon does not increase in size, instead it simply moves down.

in my theme:

  restriction-lock-row-margin-left: 95%
  restriction-lock-icon-height: 60px
  restriction-lock-icon-width: 60px
  restriction-regular-lock-color: "#FFFFFF"

In my Lovelace view:

      - type: entities
        title: Lighting Groups
        show_header_toggle: false
        entities:
          - card:
              entity: light.dark_early_lights
              icon: mdi:lightbulb-on
            type: "custom:restriction-card"
            row: true

          - card:
              entity: light.all_house_lights
              icon: mdi:lightbulb-multiple
            type: "custom:restriction-card"
            row: true

Screenshots:

Without setting height/width in theme:

locksorig

With height/width set in theme as above:

switchlocks

Javascript errors shown in the web inspector (if applicable):

Additional information: Not sure if this is helpful, but the following are installed:

BROWSER_MOD 1.0.1 IS INSTALLED card-tools.js:1 CARD-TOOLS 2.1.2 IS INSTALLED restriction-card.js:200 RESTRICTION-CARD Version 1.1.9
custom-header.js:145 CUSTOM-HEADER Version 1.3.2
simple-thermostat.js:1 simple-thermostat: 0.34.0 mini-graph-card-bundle.js:1 MINI-GRAPH-CARD 0.9.3 fold-entity-row.js:46 FOLD-ENTITY-ROW 1.0.1 IS INSTALLED

iantrich commented 4 years ago

My initial guess is that there is some css in the entities card that is forcing the size...I hate css 🤣

Anwen747 commented 4 years ago

I'm no CSS expert - about 10 years ago I taught myself basic HTML/CSS and wrote websites from scratch for a couple of friends...web design these days is a whole new world! The ones I volunteer maintain now are all canned software. But I understand how that cascading bit can bite you in the bum :joy: Hope you can figure it out without too much trouble!

iantrich commented 4 years ago

Fixed in https://github.com/iantrich/restriction-card/releases/tag/1.2.3