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 {
|
||||
margin: 4px 0;
|
||||
}
|
||||
#states > div > * {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
}
|
||||
.header {
|
||||
@apply --paper-font-headline;
|
||||
/* 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 EventsMixin from '../../../mixins/events-mixin.js';
|
||||
|
||||
/*
|
||||
* @appliesMixin EventsMixin
|
||||
*/
|
||||
class HuiGenericEntityRow extends EventsMixin(PolymerElement) {
|
||||
class HuiGenericEntityRow extends PolymerElement {
|
||||
static get template() {
|
||||
return html`
|
||||
<style>
|
||||
:host {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.flex {
|
||||
margin-left: 16px;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-left: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.info,
|
||||
.info > * {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.flex ::slotted(*) {
|
||||
margin-left: 8px;
|
||||
}
|
||||
.secondary,
|
||||
ha-relative-time {
|
||||
|
@ -13,6 +13,11 @@ import LocalizeMixin from '../../../mixins/localize-mixin.js';
|
||||
class HuiTextEntityRow extends LocalizeMixin(PolymerElement) {
|
||||
static get template() {
|
||||
return html`
|
||||
<style>
|
||||
div {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
<hui-generic-entity-row
|
||||
hass="[[hass]]"
|
||||
config="[[_config]]"
|
||||
|
Loading…
x
Reference in New Issue
Block a user