mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Update sortable styling (#19169)
This commit is contained in:
parent
1916dff57b
commit
7983556f98
@ -207,7 +207,8 @@ export class DialogAreaFilter
|
|||||||
color: var(--disabled-text-color);
|
color: var(--disabled-text-color);
|
||||||
}
|
}
|
||||||
.handle {
|
.handle {
|
||||||
cursor: move;
|
cursor: move; /* fallback if grab cursor is unsupported */
|
||||||
|
cursor: grab;
|
||||||
}
|
}
|
||||||
.actions {
|
.actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -319,7 +319,8 @@ export default class HaAutomationAction extends LitElement {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.handle {
|
.handle {
|
||||||
cursor: move;
|
cursor: move; /* fallback if grab cursor is unsupported */
|
||||||
|
cursor: grab;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
.handle ha-svg-icon {
|
.handle ha-svg-icon {
|
||||||
|
@ -543,7 +543,8 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
|||||||
padding: 0 16px 16px 16px;
|
padding: 0 16px 16px 16px;
|
||||||
}
|
}
|
||||||
.handle {
|
.handle {
|
||||||
cursor: move;
|
cursor: move; /* fallback if grab cursor is unsupported */
|
||||||
|
cursor: grab;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
.handle ha-svg-icon {
|
.handle ha-svg-icon {
|
||||||
|
@ -358,7 +358,8 @@ export default class HaAutomationCondition extends LitElement {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.handle {
|
.handle {
|
||||||
cursor: move;
|
cursor: move; /* fallback if grab cursor is unsupported */
|
||||||
|
cursor: grab;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
.handle ha-svg-icon {
|
.handle ha-svg-icon {
|
||||||
|
@ -298,7 +298,8 @@ export default class HaAutomationTrigger extends LitElement {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.handle {
|
.handle {
|
||||||
cursor: move;
|
cursor: move; /* fallback if grab cursor is unsupported */
|
||||||
|
cursor: grab;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
.handle ha-svg-icon {
|
.handle ha-svg-icon {
|
||||||
|
@ -285,7 +285,8 @@ class HaInputSelectForm extends LitElement {
|
|||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.handle {
|
.handle {
|
||||||
cursor: move;
|
cursor: move; /* fallback if grab cursor is unsupported */
|
||||||
|
cursor: grab;
|
||||||
padding-right: 12px;
|
padding-right: 12px;
|
||||||
}
|
}
|
||||||
.handle ha-svg-icon {
|
.handle ha-svg-icon {
|
||||||
|
@ -57,6 +57,7 @@ import { findEntities } from "../common/find-entities";
|
|||||||
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
import { createEntityNotFoundWarning } from "../components/hui-warning";
|
||||||
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
import { LovelaceCard, LovelaceCardEditor } from "../types";
|
||||||
import { TodoListCardConfig } from "./types";
|
import { TodoListCardConfig } from "./types";
|
||||||
|
import { sortableStyles } from "../../../resources/ha-sortable-style";
|
||||||
|
|
||||||
@customElement("hui-todo-list-card")
|
@customElement("hui-todo-list-card")
|
||||||
export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
||||||
@ -619,7 +620,9 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
return css`
|
return [
|
||||||
|
sortableStyles,
|
||||||
|
css`
|
||||||
ha-card {
|
ha-card {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -741,7 +744,8 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.handle {
|
.handle {
|
||||||
cursor: move;
|
cursor: move; /* fallback if grab cursor is unsupported */
|
||||||
|
cursor: grab;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
padding: 16px 4px;
|
padding: 16px 4px;
|
||||||
}
|
}
|
||||||
@ -773,7 +777,8 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
|||||||
.warning {
|
.warning {
|
||||||
color: var(--error-color);
|
color: var(--error-color);
|
||||||
}
|
}
|
||||||
`;
|
`,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +181,8 @@ export class HuiEntityEditor extends LitElement {
|
|||||||
}
|
}
|
||||||
.entity .handle {
|
.entity .handle {
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
cursor: move;
|
cursor: move; /* fallback if grab cursor is unsupported */
|
||||||
|
cursor: grab;
|
||||||
padding-inline-end: 8px;
|
padding-inline-end: 8px;
|
||||||
padding-inline-start: initial;
|
padding-inline-start: initial;
|
||||||
direction: var(--direction);
|
direction: var(--direction);
|
||||||
|
@ -460,7 +460,8 @@ export class HuiCardFeaturesEditor extends LitElement {
|
|||||||
}
|
}
|
||||||
.feature .handle {
|
.feature .handle {
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
cursor: move;
|
cursor: move; /* fallback if grab cursor is unsupported */
|
||||||
|
cursor: grab;
|
||||||
padding-inline-end: 8px;
|
padding-inline-end: 8px;
|
||||||
padding-inline-start: initial;
|
padding-inline-start: initial;
|
||||||
direction: var(--direction);
|
direction: var(--direction);
|
||||||
|
@ -243,7 +243,8 @@ export class HuiEntitiesCardRowEditor extends LitElement {
|
|||||||
|
|
||||||
.entity .handle {
|
.entity .handle {
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
cursor: move;
|
cursor: move; /* fallback if grab cursor is unsupported */
|
||||||
|
cursor: grab;
|
||||||
padding-inline-end: 8px;
|
padding-inline-end: 8px;
|
||||||
padding-inline-start: initial;
|
padding-inline-start: initial;
|
||||||
direction: var(--direction);
|
direction: var(--direction);
|
||||||
|
@ -34,14 +34,22 @@ export const sortableStyles = css`
|
|||||||
|
|
||||||
.sortable-fallback {
|
.sortable-fallback {
|
||||||
display: none;
|
display: none;
|
||||||
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sortable-ghost {
|
.sortable-ghost {
|
||||||
|
border: 2px solid var(--primary-color);
|
||||||
|
background: rgba(var(--rgb-primary-color), 0.25);
|
||||||
|
border-radius: 4px;
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sortable-fallback {
|
.sortable-drag {
|
||||||
opacity: 0;
|
border-radius: 4px;
|
||||||
|
opacity: 1;
|
||||||
|
background: var(--card-background-color);
|
||||||
|
box-shadow: 0px 4px 8px 3px #00000026;
|
||||||
|
cursor: grabbing;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes keyframes1 {
|
@keyframes keyframes1 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user