Skip to content

Commit

Permalink
fix: Panel mode should exclude header height (#1738)
Browse files Browse the repository at this point in the history
* fix: Panel mode should exclude header height

* Update docs to clarify aspect-ratio behavior in a panel
  • Loading branch information
dermotduffy authored Dec 12, 2024
1 parent 47fdfbc commit 1992db2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/configuration/dimensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ dimensions:
- `4 / 3` or `4:3`: Default fullscreen ratio.
- `[W]/[H]` or `[W]:[H]`: Any arbitrary aspect-ratio.

?> When in a [Panel View](https://www.home-assistant.io/dashboards/panel/) the aspect-ratio of the card are pegged to the exact size of the panel. As such, static aspect-ratio parameters will have no effect.

## Fully expanded reference

[](common/expanded-warning.md ':include')
Expand Down
6 changes: 2 additions & 4 deletions src/scss/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ frigate-card-loading {
filter: brightness(75%);
}
:host([panel]) {
// Card always extends to the full allowed height in panel mode (in non-panel
// mode this would cause the card to expand to the height of a column when
// there are multiple cards in the column).
height: 100%;
// Card always extends to the full height in panel mode
height: calc(100vh - var(--header-height));
}

div.main {
Expand Down

0 comments on commit 1992db2

Please sign in to comment.