Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for HA 2023.4 #242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ All column based layouts accept the following `layout` options:
| `max_cols` | number | Maximum number of columns to show | 4 if sidebar is hidden <br> 3 if sidebar is shown |
| `rtl` | `true`/`false` | Place columns in right-to-left order | `false` |
| `column_widths` | special | A [`grid-template-columns`](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns) specification of column widths | `none` |
| `margin` | string | A CSS margin applied to the layout itself | `4px 4px 0px 4px` |
| `padding` | string | A CSS padding applied to the layout itself | `0px` |
| `margin` | string | A CSS margin applied to the layout itself | `0px 4px 0px 4px` |
| `padding` | string | A CSS padding applied to the layout itself | `4px 0px 4px 0px` |
| `height` | string | A CSS height applied to the layout itself | `auto` |
| `card_margin` | string | CSS margin applied to each card in the layout | `var(--masonry-view-card-margin, 4px 4px 8px)` |
| `reflow` | `true`/`false` | If `true` the layout will get reorganized when cards are hidden (e.g. with conditional or entity-filter cards). May cause performance issues. | `false` |
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/base-column-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export class BaseColumnLayout extends BaseLayout {
--column-max-width: ${column_max_width}px;
--column-width: ${column_width}px;
--column-widths: ${this._config.layout?.column_widths ?? "none"};
--layout-margin: ${this._config.layout?.margin ?? "4px 4px 0px 4px"};
--layout-padding: ${this._config.layout?.padding ?? "0px"};
--layout-margin: ${this._config.layout?.margin ?? "0px 4px 0px 4px"};
--layout-padding: ${this._config.layout?.padding ?? "4px 0px 4px 0px"};
--card-margin: ${
this._config.layout?.card_margin ??
"var(--masonry-view-card-margin, 4px 4px 8px)"
Expand Down
3 changes: 1 addition & 2 deletions src/layouts/base-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ export class BaseLayout extends LitElement {
static get _fab_styles() {
return css`
ha-fab {
position: sticky;
float: right;
position: fixed;
right: calc(16px + env(safe-area-inset-right));
bottom: calc(16px + env(safe-area-inset-bottom));
z-index: 1;
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class GridLayout extends BaseLayout {
const styleEl = document.createElement("style");
styleEl.innerHTML = `
:host {
--layout-margin: ${this._config.layout?.margin ?? "4px 4px 0px 4px"};
--layout-padding: ${this._config.layout?.padding ?? "0px"};
--layout-margin: ${this._config.layout?.margin ?? "0px 4px 0px 4px"};
--layout-padding: ${this._config.layout?.padding ?? "4px 0px 4px 0px"};
--layout-height: ${this._config.layout?.height ?? "auto"};
--layout-overflow: ${
this._config.layout?.height !== undefined ? "auto" : "visible"
Expand Down