Skip to content

Commit

Permalink
New Customization Feature: Min-Width of sections (#48)
Browse files Browse the repository at this point in the history
Added the possibility to define the min width of a section with the variabel `token-size-section-min-width`.

---------

Co-authored-by: Tilman Griesel <[email protected]>
  • Loading branch information
MephistoJB and TilmanGriesel authored Nov 28, 2024
1 parent df779a3 commit 9e97760
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ ha-card-box-shadow: var(--token-shadow-card-medium)

# Sections
ha-view-sections-column-gap: var(--token-size-spacing-medium)
ha-view-sections-column-min-width: var(--token-size-section-min-width)

# States
state-icon-color: var(--token-color-icon-primary)
Expand Down
1 change: 1 addition & 0 deletions src/tokens_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ token-size-font-title-card: var(--token-size-font-medium)

## Spacing
token-size-spacing-medium: 16px
token-size-section-min-width: 320px

################################################################################
# Color tokens
Expand Down
8 changes: 6 additions & 2 deletions themes/graphite-auto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Graphite Auto:
# throughout the entire Home Assistant interface, including the administration panel and code editors.
# https://github.com/TilmanGriesel/graphite

# This file was generated at 2024-11-17 15:16:14
# This file was generated at 2024-11-28 07:12:30

# Color tokens
token-rgb-primary: 255, 158, 0
Expand Down Expand Up @@ -111,6 +111,7 @@ Graphite Auto:

## Spacing
token-size-spacing-medium: 16px
token-size-section-min-width: 320px

################################################################################
# Color tokens
Expand Down Expand Up @@ -220,6 +221,7 @@ Graphite Auto:

# Sections
ha-view-sections-column-gap: var(--token-size-spacing-medium)
ha-view-sections-column-min-width: var(--token-size-section-min-width)

# States
state-icon-color: var(--token-color-icon-primary)
Expand Down Expand Up @@ -357,7 +359,7 @@ Graphite Auto:
# throughout the entire Home Assistant interface, including the administration panel and code editors.
# https://github.com/TilmanGriesel/graphite

# This file was generated at 2024-11-17 15:16:14
# This file was generated at 2024-11-28 07:12:30

# Color tokens
token-rgb-primary: 229, 145, 9
Expand Down Expand Up @@ -461,6 +463,7 @@ Graphite Auto:

## Spacing
token-size-spacing-medium: 16px
token-size-section-min-width: 320px

################################################################################
# Color tokens
Expand Down Expand Up @@ -570,6 +573,7 @@ Graphite Auto:

# Sections
ha-view-sections-column-gap: var(--token-size-spacing-medium)
ha-view-sections-column-min-width: var(--token-size-section-min-width)

# States
state-icon-color: var(--token-color-icon-primary)
Expand Down
4 changes: 3 additions & 1 deletion themes/graphite-light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Graphite Light:
# throughout the entire Home Assistant interface, including the administration panel and code editors.
# https://github.com/TilmanGriesel/graphite

# This file was generated at 2024-11-17 15:16:14
# This file was generated at 2024-11-28 07:12:30

# Color tokens
token-rgb-primary: 255, 158, 0
Expand Down Expand Up @@ -110,6 +110,7 @@ Graphite Light:

## Spacing
token-size-spacing-medium: 16px
token-size-section-min-width: 320px

################################################################################
# Color tokens
Expand Down Expand Up @@ -219,6 +220,7 @@ Graphite Light:

# Sections
ha-view-sections-column-gap: var(--token-size-spacing-medium)
ha-view-sections-column-min-width: var(--token-size-section-min-width)

# States
state-icon-color: var(--token-color-icon-primary)
Expand Down
4 changes: 3 additions & 1 deletion themes/graphite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Graphite:
# throughout the entire Home Assistant interface, including the administration panel and code editors.
# https://github.com/TilmanGriesel/graphite

# This file was generated at 2024-11-17 15:16:14
# This file was generated at 2024-11-28 07:12:30

# Color tokens
token-rgb-primary: 229, 145, 9
Expand Down Expand Up @@ -110,6 +110,7 @@ Graphite:

## Spacing
token-size-spacing-medium: 16px
token-size-section-min-width: 320px

################################################################################
# Color tokens
Expand Down Expand Up @@ -219,6 +220,7 @@ Graphite:

# Sections
ha-view-sections-column-gap: var(--token-size-spacing-medium)
ha-view-sections-column-min-width: var(--token-size-section-min-width)

# States
state-icon-color: var(--token-color-icon-primary)
Expand Down

0 comments on commit 9e97760

Please sign in to comment.