Fix deprecated CSS (#928)

* Fix nested var

* Fix deprecated @apply syntax

* Hassio
This commit is contained in:
Paulus Schoutsen 2018-02-26 11:43:58 -08:00 committed by GitHub
parent 0ab240c678
commit ff658c86ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 84 additions and 84 deletions

View File

@ -15,8 +15,8 @@
display: block; display: block;
} }
.card-actions { .card-actions {
@apply(--layout); @apply --layout;
@apply(--layout-justified); @apply --layout-justified;
} }
.errors { .errors {
color: var(--google-red-500); color: var(--google-red-500);

View File

@ -21,8 +21,8 @@
margin-bottom: 16px; margin-bottom: 16px;
} }
.card-actions { .card-actions {
@apply(--layout); @apply --layout;
@apply(--layout-justified); @apply --layout-justified;
} }
</style> </style>
<paper-card heading='Network'> <paper-card heading='Network'>

View File

@ -22,7 +22,7 @@
margin-top: 24px; margin-top: 24px;
} }
h1 { h1 {
@apply(--paper-font-headline); @apply --paper-font-headline;
margin: 0; margin: 0;
} }
.error { .error {

View File

@ -27,7 +27,7 @@
margin-top: 24px; margin-top: 24px;
} }
h1 { h1 {
@apply(--paper-font-headline); @apply --paper-font-headline;
margin: 0; margin: 0;
} }
.error { .error {

View File

@ -24,7 +24,7 @@
margin-top: 24px; margin-top: 24px;
} }
h1 { h1 {
@apply(--paper-font-headline); @apply --paper-font-headline;
margin: 0; margin: 0;
} }
.error { .error {

View File

@ -14,8 +14,8 @@
<template> <template>
<style include="iron-flex ha-style"> <style include="iron-flex ha-style">
.validate-container { .validate-container {
@apply(--layout-vertical); @apply --layout-vertical;
@apply(--layout-center-center); @apply --layout-center-center;
height: 140px; height: 140px;
} }

View File

@ -14,9 +14,9 @@
<template> <template>
<style include="iron-flex ha-style ha-form-style"> <style include="iron-flex ha-style ha-form-style">
.entities-header { .entities-header {
@apply(--layout-horizontal); @apply --layout-horizontal;
@apply(--layout-justified); @apply --layout-justified;
@apply(--layout-center); @apply --layout-center;
width: 100%; width: 100%;
} }
@ -37,8 +37,8 @@
} }
.entity-row { .entity-row {
@apply(--layout-horizontal); @apply --layout-horizontal;
@apply(--layout-center); @apply --layout-center;
padding: 4px 0; padding: 4px 0;
border-top: 1px solid rgba(0, 0, 0, .12); border-top: 1px solid rgba(0, 0, 0, .12);
} }

View File

@ -6,7 +6,7 @@
<template> <template>
<style> <style>
:host { :host {
@apply(--layout-horizontal); @apply --layout-horizontal;
} }
.icon-image { .icon-image {
border: 1px solid grey; border: 1px solid grey;

View File

@ -5,10 +5,10 @@
<template> <template>
<style> <style>
:host { :host {
@apply(--layout-horizontal); @apply --layout-horizontal;
} }
paper-input { paper-input {
@apply(--layout-flex); @apply --layout-flex;
} }
.key { .key {
padding-right: 20px; padding-right: 20px;

View File

@ -11,7 +11,7 @@
} }
.header { .header {
@apply(--paper-font-display1); @apply --paper-font-display1;
opacity: var(--dark-primary-opacity); opacity: var(--dark-primary-opacity);
} }
@ -20,7 +20,7 @@
} }
.intro { .intro {
@apply(--paper-font-subhead); @apply --paper-font-subhead;
width: 100%; width: 100%;
max-width: 400px; max-width: 400px;
margin-right: 40px; margin-right: 40px;
@ -43,7 +43,7 @@
margin-top: 20px; margin-top: 20px;
} }
.narrow .header { .narrow .header {
@apply(--paper-font-headline); @apply --paper-font-headline;
} }
.narrow .intro { .narrow .intro {
font-size: 14px; font-size: 14px;

View File

@ -7,13 +7,13 @@
} }
.device-picker { .device-picker {
@apply(--layout-horizontal); @apply --layout-horizontal;
padding-bottom: 24px; padding-bottom: 24px;
} }
.form-placeholder { .form-placeholder {
@apply(--layout-vertical); @apply --layout-vertical;
@apply(--layout-center-center); @apply --layout-center-center;
height: 96px; height: 96px;
} }
@ -22,8 +22,8 @@
} }
.card-actions { .card-actions {
@apply(--layout-horizontal); @apply --layout-horizontal;
@apply(--layout-justified); @apply --layout-justified;
} }
</style> </style>
<paper-card> <paper-card>

View File

@ -2,22 +2,22 @@
<template> <template>
<style> <style>
.form-group { .form-group {
@apply(--layout-horizontal); @apply --layout-horizontal;
@apply(--layout-center); @apply --layout-center;
padding: 8px 16px; padding: 8px 16px;
} }
.form-group label { .form-group label {
@apply(--layout-flex-2); @apply --layout-flex-2;
} }
.form-group .form-control { .form-group .form-control {
@apply(--layout-flex); @apply --layout-flex;
} }
.form-group.vertical { .form-group.vertical {
@apply(--layout-vertical); @apply --layout-vertical;
@apply(--layout-start); @apply --layout-start;
} }
paper-dropdown-menu.form-control { paper-dropdown-menu.form-control {

View File

@ -49,8 +49,8 @@
} }
.device-picker { .device-picker {
@apply(--layout-horizontal); @apply --layout-horizontal;
@apply(--layout-center-center); @apply --layout-center-center;
padding-left: 24px; padding-left: 24px;
padding-right: 24px; padding-right: 24px;
padding-bottom: 24px; padding-bottom: 24px;

View File

@ -20,8 +20,8 @@
} }
.device-picker { .device-picker {
@apply(--layout-horizontal); @apply --layout-horizontal;
@apply(--layout-center-center); @apply --layout-center-center;
padding-left: 24px; padding-left: 24px;
padding-right: 24px; padding-right: 24px;
padding-bottom: 24px; padding-bottom: 24px;

View File

@ -21,8 +21,8 @@
} }
.device-picker { .device-picker {
@apply(--layout-horizontal); @apply --layout-horizontal;
@apply(--layout-center-center); @apply --layout-center-center;
padding-left: 24px; padding-left: 24px;
padding-right: 24px; padding-right: 24px;
padding-bottom: 24px; padding-bottom: 24px;

View File

@ -21,8 +21,8 @@
} }
.device-picker { .device-picker {
@apply(--layout-horizontal); @apply --layout-horizontal;
@apply(--layout-center-center); @apply --layout-center-center;
padding-left: 24px; padding-left: 24px;
padding-right: 24px; padding-right: 24px;
padding-bottom: 24px; padding-bottom: 24px;

View File

@ -20,8 +20,8 @@
} }
.device-picker { .device-picker {
@apply(--layout-horizontal); @apply --layout-horizontal;
@apply(--layout-center-center); @apply --layout-center-center;
padding-left: 24px; padding-left: 24px;
padding-right: 24px; padding-right: 24px;
padding-bottom: 24px; padding-bottom: 24px;

View File

@ -14,7 +14,7 @@
} }
.entry { .entry {
@apply(--paper-font-body1); @apply --paper-font-body1;
line-height: 2em; line-height: 2em;
} }

View File

@ -19,7 +19,7 @@
line-height: 2.5em; line-height: 2.5em;
font-size: 1.5em; font-size: 1.5em;
border-radius: 50%; border-radius: 50%;
border: 0.1em solid var(--ha-marker-color, --default-primary-color); border: 0.1em solid var(--ha-marker-color, var(--default-primary-color));
color: rgb(76, 76, 76); color: rgb(76, 76, 76);
background-color: white; background-color: white;
} }

View File

@ -21,7 +21,7 @@
border-radius: 2px; border-radius: 2px;
} }
.caption { .caption {
@apply(--paper-font-common-nowrap); @apply --paper-font-common-nowrap;
position: absolute; position: absolute;
left: 0px; left: 0px;
right: 0px; right: 0px;

View File

@ -18,7 +18,7 @@
padding: 4px 0; padding: 4px 0;
} }
.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,
compensating this with reduced padding */ compensating this with reduced padding */
line-height: 40px; line-height: 40px;
@ -26,7 +26,7 @@
padding: 4px 0 12px; padding: 4px 0 12px;
} }
.header .name { .header .name {
@apply(--paper-font-common-nowrap); @apply --paper-font-common-nowrap;
} }
ha-entity-toggle { ha-entity-toggle {
margin-left: 16px; margin-left: 16px;

View File

@ -15,11 +15,11 @@
width: 100%; width: 100%;
} }
.header { .header {
@apply(--paper-font-headline); @apply --paper-font-headline;
line-height: 40px; line-height: 40px;
color: var(--primary-text-color); color: var(--primary-text-color);
padding: 20px 16px 12px; padding: 20px 16px 12px;
@apply(--paper-font-common-nowrap); @apply --paper-font-common-nowrap;
} }
paper-card[dialog] .header { paper-card[dialog] .header {
padding-top: 0; padding-top: 0;

View File

@ -73,7 +73,7 @@
} }
.banner > .caption { .banner > .caption {
@apply(--paper-font-caption); @apply --paper-font-caption;
position: absolute; position: absolute;
left: 0; left: 0;
@ -96,7 +96,7 @@
} }
.banner > .caption .title { .banner > .caption .title {
@apply(--paper-font-common-nowrap); @apply --paper-font-common-nowrap;
font-size: 1.2em; font-size: 1.2em;
margin: 8px 0 4px; margin: 8px 0 4px;
} }
@ -109,7 +109,7 @@
.controls { .controls {
position: relative; position: relative;
@apply(--paper-font-body1); @apply --paper-font-body1;
padding: 8px; padding: 8px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;

View File

@ -10,7 +10,7 @@
<template> <template>
<style> <style>
:host { :host {
@apply(--paper-font-body1); @apply --paper-font-body1;
} }
ha-markdown { ha-markdown {
display: block; display: block;

View File

@ -31,8 +31,8 @@
} }
.progress { .progress {
@apply(--layout); @apply --layout;
@apply(--layout-center-center); @apply --layout-center-center;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;

View File

@ -32,7 +32,7 @@
} }
.grey { .grey {
--ha-label-badge-color: var(--label-badge-grey, --paper-grey-500); --ha-label-badge-color: var(--label-badge-grey, var(--paper-grey-500));
} }
</style> </style>

View File

@ -8,7 +8,7 @@
<template> <template>
<style> <style>
:host { :host {
@apply(--paper-font-body1); @apply --paper-font-body1;
min-width: 150px; min-width: 150px;
white-space: nowrap; white-space: nowrap;
} }
@ -22,7 +22,7 @@
} }
.name { .name {
@apply(--paper-font-common-nowrap); @apply --paper-font-common-nowrap;
color: var(--primary-text-color); color: var(--primary-text-color);
line-height: 40px; line-height: 40px;
} }
@ -32,7 +32,7 @@
} }
.time-ago, ::slotted(*) { .time-ago, ::slotted(*) {
@apply(--paper-font-common-nowrap); @apply --paper-font-common-nowrap;
color: var(--secondary-text-color); color: var(--secondary-text-color);
} }
</style> </style>

View File

@ -12,8 +12,8 @@
background-color: var(--paper-card-background-color, white); background-color: var(--paper-card-background-color, white);
} }
.header { .header {
@apply(--paper-font-headline); @apply --paper-font-headline;
@apply(--paper-font-common-expensive-kerning); @apply --paper-font-common-expensive-kerning;
opacity: var(--dark-primary-opacity); opacity: var(--dark-primary-opacity);
padding: 24px 16px 16px; padding: 24px 16px 16px;
text-transform: capitalize; text-transform: capitalize;

View File

@ -10,15 +10,15 @@
<style> <style>
/* local DOM styles go here */ /* local DOM styles go here */
:host { :host {
@apply(--layout-flex); @apply --layout-flex;
@apply(--layout-horizontal); @apply --layout-horizontal;
@apply(--layout-justified); @apply --layout-justified;
} }
.in-flux#target_temperature { .in-flux#target_temperature {
color: var(--google-red-500); color: var(--google-red-500);
} }
#target_temperature { #target_temperature {
@apply(--layout-self-center); @apply --layout-self-center;
font-size: 200%; font-size: 200%;
} }
.control-buttons { .control-buttons {

View File

@ -19,7 +19,7 @@
line-height: var(--ha-label-badge-size, 2.5em); line-height: var(--ha-label-badge-size, 2.5em);
font-size: var(--ha-label-badge-font-size, 1.5em); font-size: var(--ha-label-badge-font-size, 1.5em);
border-radius: 50%; border-radius: 50%;
border: 0.1em solid var(--ha-label-badge-color, --primary-color); border: 0.1em solid var(--ha-label-badge-color, var(--primary-color));
color: var(--label-badge-text-color, rgb(76, 76, 76)); color: var(--label-badge-text-color, rgb(76, 76, 76));
white-space: nowrap; white-space: nowrap;
@ -47,7 +47,7 @@
.label-badge .label span { .label-badge .label span {
max-width: 68%; /* Parent width minus two times 16% padding */ max-width: 68%; /* Parent width minus two times 16% padding */
display: inline-block; display: inline-block;
background-color: var(--ha-label-badge-color, --primary-color); background-color: var(--ha-label-badge-color, var(--primary-color));
color: white; color: white;
border-radius: 1em; border-radius: 1em;
padding: 8% 16%; padding: 8% 16%;

View File

@ -26,7 +26,7 @@
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none; -moz-user-select: none;
border-right: 1px solid var(--divider-color); border-right: 1px solid var(--divider-color);
background: var(--paper-listbox-background-color,var(--primary-background-color)); background: var(--paper-listbox-background-color, var(--primary-background-color));
} }
app-toolbar { app-toolbar {
@ -64,7 +64,7 @@
} }
paper-icon-item .item-text { paper-icon-item .item-text {
@apply(--sidebar-text); @apply --sidebar-text;
} }
paper-icon-item.iron-selected .item-text { paper-icon-item.iron-selected .item-text {
opacity: 1; opacity: 1;
@ -82,11 +82,11 @@
} }
.setting { .setting {
@apply(--sidebar-text); @apply --sidebar-text;
} }
.subheader { .subheader {
@apply(--sidebar-text); @apply --sidebar-text;
padding: 16px; padding: 16px;
} }

View File

@ -16,7 +16,7 @@
<style is="custom-style" include="iron-flex iron-flex-alignment"></style> <style is="custom-style" include="iron-flex iron-flex-alignment"></style>
<style> <style>
:host { :host {
@apply(--paper-font-body1); @apply --paper-font-body1;
line-height: 1.5; line-height: 1.5;
} }

View File

@ -82,7 +82,7 @@
<template> <template>
<style> <style>
:host { :host {
@apply(--paper-font-body1); @apply --paper-font-body1;
} }
app-header-layout, ha-app-layout { app-header-layout, ha-app-layout {
@ -101,7 +101,7 @@
} }
h1 { h1 {
@apply(--paper-font-title); @apply --paper-font-title;
} }
button.link { button.link {

View File

@ -10,7 +10,7 @@
<style is="custom-style" include="iron-flex iron-flex-alignment"></style> <style is="custom-style" include="iron-flex iron-flex-alignment"></style>
<style> <style>
:host { :host {
@apply(--paper-font-body1); @apply --paper-font-body1;
line-height: 1.5; line-height: 1.5;
} }

View File

@ -11,7 +11,7 @@
<style is="custom-style" include="iron-flex iron-flex-alignment"></style> <style is="custom-style" include="iron-flex iron-flex-alignment"></style>
<style> <style>
.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;

View File

@ -20,7 +20,7 @@
margin-left: auto; margin-left: auto;
} }
.state { .state {
@apply(--paper-font-body1); @apply --paper-font-body1;
color: var(--primary-text-color); color: var(--primary-text-color);
text-align: right; text-align: right;

View File

@ -13,14 +13,14 @@
} }
.state { .state {
@apply(--paper-font-common-nowrap); @apply --paper-font-common-nowrap;
@apply(--paper-font-body1); @apply --paper-font-body1;
margin-left: 16px; margin-left: 16px;
text-align: right; text-align: right;
} }
.main-text { .main-text {
@apply(--paper-font-common-nowrap); @apply --paper-font-common-nowrap;
color: var(--primary-text-color); color: var(--primary-text-color);
text-transform: capitalize; text-transform: capitalize;
} }
@ -30,7 +30,7 @@
} }
.secondary-text { .secondary-text {
@apply(--paper-font-common-nowrap); @apply --paper-font-common-nowrap;
color: var(--secondary-text-color); color: var(--secondary-text-color);
} }
</style> </style>

View File

@ -11,7 +11,7 @@
<style is="custom-style" include="iron-flex iron-flex-alignment"></style> <style is="custom-style" include="iron-flex iron-flex-alignment"></style>
<style> <style>
.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;

View File

@ -9,8 +9,8 @@
display: block; display: block;
} }
.name { .name {
@apply(--paper-font-common-nowrap); @apply --paper-font-common-nowrap;
@apply(--paper-font-body1); @apply --paper-font-body1;
color: var(--primary-color); color: var(--primary-color);
text-transform: capitalize; text-transform: capitalize;