mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 04:46:34 +00:00
Tweak tabs a little.
This commit is contained in:
parent
57dfeeff81
commit
0a57e08156
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
<dom-module id="ha-view-tabs">
|
<dom-module id="ha-view-tabs">
|
||||||
<style>
|
<style>
|
||||||
|
:host {
|
||||||
|
--paper-tabs-selection-bar-color: #FFF;
|
||||||
|
}
|
||||||
paper-tab {
|
paper-tab {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
@ -17,14 +17,27 @@
|
|||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
paper-scroll-header-panel {
|
paper-scroll-header-panel[has-views] paper-toolbar {
|
||||||
--paper-scroll-header-panel-condensed-header: {
|
height: 104px;
|
||||||
background-color: red;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
paper-scroll-header-panel[has-views] paper-toolbar {
|
paper-toolbar:after {
|
||||||
height: 128px;
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0px;
|
||||||
|
right: 0px;
|
||||||
|
bottom: -5px;
|
||||||
|
width: 100%;
|
||||||
|
height: 5px;
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0;
|
||||||
|
box-shadow: inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4);
|
||||||
|
will-change: opacity;
|
||||||
|
transition: opacity 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
paper-scroll-header-panel.condensed paper-toolbar:after {
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-icon {
|
.menu-icon {
|
||||||
@ -37,6 +50,7 @@
|
|||||||
|
|
||||||
.views {
|
.views {
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
|
--paper-tabs-selection-bar-color: #FFF;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -135,11 +135,12 @@ export default new Polymer({
|
|||||||
|
|
||||||
headerScrollAdjust(ev) {
|
headerScrollAdjust(ev) {
|
||||||
if (!this.hasViews) return;
|
if (!this.hasViews) return;
|
||||||
Polymer.Base.transform(`translateY(-${ev.detail.y}px)`, this.$.menu);
|
this.translate3d('0', `-${ev.detail.y}px`, '0', this.$.menu);
|
||||||
|
this.toggleClass('condensed', ev.detail.y === 56, this.$.panel);
|
||||||
},
|
},
|
||||||
|
|
||||||
computeHeaderHeight(hasViews) {
|
computeHeaderHeight(hasViews) {
|
||||||
return hasViews ? 128 : 64;
|
return hasViews ? 104 : 64;
|
||||||
},
|
},
|
||||||
|
|
||||||
computeCondensedHeaderHeight(hasViews) {
|
computeCondensedHeaderHeight(hasViews) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user