Skip to content

Commit

Permalink
Fix icon size variables
Browse files Browse the repository at this point in the history
Replace restriction-lock-icon-height/width with restriction-lock-icon-size
  • Loading branch information
iantrich committed Jun 26, 2020
1 parent 0ea4913 commit 706a0b9
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 9 deletions.
62 changes: 61 additions & 1 deletion .devcontainer/configuration.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,64 @@
default_config:
lovelace:
mode: yaml
demo:
demo:
frontend:
themes:
amoled:
accent-color: '#E45E65'
card-background-color: 'var(--paper-card-background-color)'
dark-primary-color: 'var(--accent-color)'
disabled-text-color: '#7F848E'
divider-color: 'rgba(0, 0, 0, .12)'
google-green-500: '#39E949'
google-red-500: '#E45E65'
ha-card-background: '#000000'
label-badge-background-color: '#2E333A'
label-badge-border-color: 'green'
label-badge-red: 'var(--accent-color)'
label-badge-text-color: 'var(--primary-text-color)'
light-primary-color: 'var(--accent-color)'
paper-button-color: '#5294E2'
paper-button-ink-color: '#5294E2'
paper-card-background-color: '#000000'
paper-card-header-color: 'var(--accent-color)'
paper-dialog-background-color: '#000000'
paper-grey-200: '#414A59'
paper-grey-50: 'var(--primary-text-color)'
paper-item-icon-active-color: '#F9C536'
paper-item-icon-color: 'var(--primary-text-color)'
paper-item-icon_-_color: 'green'
paper-item-selected_-_background-color: '#434954'
paper-listbox-background-color: '#000000'
paper-listbox-color: '#FFFFFF)'
paper-slider-active-color: 'var(--accent-color)'
paper-slider-container-color: 'linear-gradient(var(--primary-background-color), var(--secondary-background-color)) no-repeat'
paper-slider-disabled-active-color: 'var(--disabled-text-color)'
paper-slider-disabled-secondary-color: 'var(--disabled-text-color)'
paper-slider-knob-color: 'var(--accent-color)'
paper-slider-knob-start-color: 'var(--accent-color)'
paper-slider-pin-color: 'var(--accent-color)'
paper-slider-secondary-color: 'var(--secondary-background-color)'
paper-tabs-selection-bar-color: 'green'
paper-toggle-button-checked-bar-color: 'var(--accent-color)'
paper-toggle-button-checked-button-color: 'var(--accent-color)'
paper-toggle-button-checked-ink-color: 'var(--accent-color)'
paper-toggle-button-unchecked-bar-color: 'var(--disabled-text-color)'
paper-toggle-button-unchecked-button-color: 'var(--disabled-text-color)'
paper-toggle-button-unchecked-ink-color: 'var(--disabled-text-color)'
primary-background-color: '#000000'
primary-color: '#434954'
primary-text-color: '#FFFFFF'
secondary-background-color: '#383C45'
secondary-text-color: '#5294E2'
sidebar-icon-color: 'var(--primary-color)'
sidebar-selected-icon-color: 'var(--primary-text-color)'
sidebar-selected-text-color: 'var(--primary-text-color)'
sidebar-text-color: '#F1F1F1'
switch-unchecked-button-color: '#333333'
switch-unchecked-track-color: '#333333'
table-row-alternative-background-color: '#222429'
table-row-background-color: '#000000'
text-primary-color: 'var(--primary-text-color)'
# restriction-lock-icon-size: '48px'
restriction-lock-icon-opacity: 1.0
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ Can be specified by color name, hexadecimal, rgb, rgba, hsl, hsla, basically any
| `restriction-invalid--color` | `error-state-color` | Lock color after an invalid attempt to unlock |
| `restriction-lock-margin-left` | `0px` | Manually bump the left margin of the lock icon |
| `restriction-lock-row-margin-left` | `24px` | Manually bump the left margin of the lock icon in rows |
| `restriction-lock-icon-height` | `24px` | Lock icon height |
| `restriction-lock-icon-width` | `24px` | Lock icon width |
| `restriction-lock-icon-size` | `24px` | Lock icon size |
| `restriction-lock-opacity` | `0.5` | Lock icon opacity |

## Example Configurations
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "restriction-card",
"version": "1.2.2",
"version": "1.2.3",
"description": "Lovelace restriction-card",
"keywords": [
"home-assistant",
Expand Down
2 changes: 1 addition & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const CARD_VERSION = '1.2.2';
export const CARD_VERSION = '1.2.3';
6 changes: 2 additions & 4 deletions src/restriction-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,11 @@ class RestrictionCard extends LitElement implements LovelaceCard {
--invalid-lock-color: var(--restriction-invalid--color, var(--error-state-color, #db4437));
--lock-margin-left: var(--restriction-lock-margin-left, 0px);
--lock-row-margin-left: var(--restriction-lock-row-margin-left, 24px);
--lock-icon-height: var(--restriction-lock-icon-height, var(--iron-icon-height, 24px));
--lock-icon-width: var(--restriction-lock-icon-width, var(--iron-icon-width, 24px));
--lock-icon-size: var(--restriction-lock-icon-size, var(--mdc-icon-size, 24px));
--lock-opacity: var(--restriction-lock-opacity, 0.5);
}
ha-icon {
--iron-icon-height: var(--lock-icon-height);
--iron-icon-width: var(--lock-icon-width);
--mdc-icon-size: var(--lock-icon-size);
}
#overlay {
align-items: flex-start;
Expand Down

0 comments on commit 706a0b9

Please sign in to comment.