mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Improve CSS for entity rows (#1491)
This commit is contained in:
parent
5d7e4322eb
commit
6b1d04584e
@ -28,6 +28,10 @@ class HuiEntitiesCard extends EventsMixin(PolymerElement) {
|
|||||||
#states > div {
|
#states > div {
|
||||||
margin: 4px 0;
|
margin: 4px 0;
|
||||||
}
|
}
|
||||||
|
#states > div > * {
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.header {
|
.header {
|
||||||
@apply --paper-font-headline;
|
@apply --paper-font-headline;
|
||||||
/* overwriting line-height +8 because entity-toggle can be 40px height,
|
/* overwriting line-height +8 because entity-toggle can be 40px height,
|
||||||
|
@ -6,24 +6,30 @@ import '../../../components/ha-relative-time.js';
|
|||||||
|
|
||||||
import computeStateName from '../../../common/entity/compute_state_name.js';
|
import computeStateName from '../../../common/entity/compute_state_name.js';
|
||||||
|
|
||||||
import EventsMixin from '../../../mixins/events-mixin.js';
|
class HuiGenericEntityRow extends PolymerElement {
|
||||||
|
|
||||||
/*
|
|
||||||
* @appliesMixin EventsMixin
|
|
||||||
*/
|
|
||||||
class HuiGenericEntityRow extends EventsMixin(PolymerElement) {
|
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
<style>
|
<style>
|
||||||
:host {
|
:host {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.flex {
|
.flex {
|
||||||
margin-left: 16px;
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-left: 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.info,
|
||||||
|
.info > * {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.flex ::slotted(*) {
|
||||||
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
.secondary,
|
.secondary,
|
||||||
ha-relative-time {
|
ha-relative-time {
|
||||||
|
@ -13,6 +13,11 @@ import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
|||||||
class HuiTextEntityRow extends LocalizeMixin(PolymerElement) {
|
class HuiTextEntityRow extends LocalizeMixin(PolymerElement) {
|
||||||
static get template() {
|
static get template() {
|
||||||
return html`
|
return html`
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<hui-generic-entity-row
|
<hui-generic-entity-row
|
||||||
hass="[[hass]]"
|
hass="[[hass]]"
|
||||||
config="[[_config]]"
|
config="[[_config]]"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user