mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-08 18:06:36 +00:00
State display wrapping and fix full screen more-info (#991)
* state-info lower min-width, remove unnesecary wrapping div * State normal line height, align flex baseline. Get rid of wrapping div * fix full screen more-info-dialog
This commit is contained in:
parent
09fe2172b2
commit
9dc809cdb9
@ -9,7 +9,7 @@
|
|||||||
<style>
|
<style>
|
||||||
:host {
|
:host {
|
||||||
@apply --paper-font-body1;
|
@apply --paper-font-body1;
|
||||||
min-width: 150px;
|
min-width: 120px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +37,6 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div>
|
|
||||||
<state-badge state-obj='[[stateObj]]'></state-badge>
|
<state-badge state-obj='[[stateObj]]'></state-badge>
|
||||||
|
|
||||||
<div class='info'>
|
<div class='info'>
|
||||||
@ -52,7 +51,6 @@
|
|||||||
<slot>
|
<slot>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
|
@ -17,9 +17,6 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
width: 365px;
|
width: 365px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
--paper-dialog-scrollable: {
|
|
||||||
-webkit-overflow-scrolling: auto;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
more-info-controls, more-info-settings {
|
more-info-controls, more-info-settings {
|
||||||
@ -34,8 +31,7 @@
|
|||||||
--more-info-header-color: var(--text-primary-color);
|
--more-info-header-color: var(--text-primary-color);
|
||||||
}
|
}
|
||||||
:host {
|
:host {
|
||||||
max-height: 100%;
|
@apply(--ha-dialog-fullscreen);
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,10 +32,6 @@
|
|||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
paper-dialog-scrollable {
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host([domain=camera]) paper-dialog-scrollable {
|
:host([domain=camera]) paper-dialog-scrollable {
|
||||||
margin: 0 -24px -5px;
|
margin: 0 -24px -5px;
|
||||||
}
|
}
|
||||||
|
@ -148,8 +148,8 @@
|
|||||||
<dom-module id='ha-style-dialog'>
|
<dom-module id='ha-style-dialog'>
|
||||||
<template>
|
<template>
|
||||||
<style>
|
<style>
|
||||||
@media all and (max-width: 450px), all and (max-height: 500px) {
|
:host {
|
||||||
paper-dialog {
|
--ha-dialog-narrow: {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
max-height: calc(100% - 64px);
|
max-height: calc(100% - 64px);
|
||||||
@ -162,6 +162,31 @@
|
|||||||
border-bottom-left-radius: 0px;
|
border-bottom-left-radius: 0px;
|
||||||
border-bottom-right-radius: 0px;
|
border-bottom-right-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--ha-dialog-fullscreen: {
|
||||||
|
min-height: 100% !important;
|
||||||
|
width: 100% !important;
|
||||||
|
border-radius: 0px;
|
||||||
|
position: fixed !important;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
--paper-dialog-scrollable: {
|
||||||
|
-webkit-overflow-scrolling: auto;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (max-width: 450px), all and (max-height: 500px) {
|
||||||
|
paper-dialog {
|
||||||
|
@apply(--ha-dialog-narrow);
|
||||||
|
}
|
||||||
|
:host {
|
||||||
|
--paper-dialog-scrollable: {
|
||||||
|
-webkit-overflow-scrolling: auto;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</template>
|
</template>
|
||||||
|
@ -8,25 +8,28 @@
|
|||||||
|
|
||||||
<dom-module id="state-card-display">
|
<dom-module id="state-card-display">
|
||||||
<template>
|
<template>
|
||||||
<style is="custom-style" include="iron-flex iron-flex-alignment"></style>
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
:host {
|
||||||
|
@apply(--layout-horizontal);
|
||||||
|
@apply(--layout-justified);
|
||||||
|
@apply(--layout-baseline);
|
||||||
|
}
|
||||||
|
|
||||||
.state {
|
.state {
|
||||||
@apply --paper-font-body1;
|
@apply --paper-font-body1;
|
||||||
color: var(--primary-text-color);
|
color: var(--primary-text-color);
|
||||||
|
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
line-height: 40px;
|
flex: 1 0 50px;
|
||||||
}
|
}
|
||||||
.state.has-unit_of_measurement {
|
.state.has-unit_of_measurement {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class='horizontal justified layout'>
|
<state-info state-obj="[[stateObj]]" in-dialog='[[inDialog]]'></state-info>
|
||||||
<state-info state-obj="[[stateObj]]" in-dialog='[[inDialog]]'></state-info>
|
<div class$='[[computeClassNames(stateObj)]]'>[[computeStateDisplay(localize, stateObj, language)]]</div>
|
||||||
<div class$='[[computeClassNames(stateObj)]]'>[[computeStateDisplay(localize, stateObj, language)]]</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user