Commit 14354817 authored by John Lee's avatar John Lee Committed by Commit Bot

WebUI: Replace --cr-section mixin usage on ChromeOS

Use class cr-section in cases where applicable, and just use normal
CSS for cases where most of the properties of the mixin was being
overridden anyway.

Bug: 973674
Change-Id: I676998212fb0a78a3caa57d78e799054e3b565a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2121436Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753733}
parent 8f77a66b
...@@ -58,27 +58,26 @@ ...@@ -58,27 +58,26 @@
margin-inline-end: 10px; margin-inline-end: 10px;
} }
.section { .cr-section {
@apply --cr-section;
margin-bottom: 10px; margin-bottom: 10px;
} }
.section.first { .cr-section.first {
border-top: none; border-top: none;
} }
.section.single-column { .cr-section.single-column {
align-items: stretch; align-items: stretch;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
} }
.section > .start { .cr-section > .start {
align-items: center; align-items: center;
flex: auto; flex: auto;
} }
.section cr-button + cr-button { .cr-section cr-button + cr-button {
margin-inline-start: 8px; margin-inline-start: 8px;
} }
...@@ -94,7 +93,7 @@ ...@@ -94,7 +93,7 @@
</style> </style>
<!-- Title section: Icon + name + connection state. --> <!-- Title section: Icon + name + connection state. -->
<div id="title" class="section first"> <div id="title" class="cr-section first">
<div class="start layout horizontal center"> <div class="start layout horizontal center">
<network-icon <network-icon
show-technology-badge="[[showTechnologyBadge_]]" show-technology-badge="[[showTechnologyBadge_]]"
...@@ -122,7 +121,7 @@ ...@@ -122,7 +121,7 @@
<!-- SIM Info (Cellular only). --> <!-- SIM Info (Cellular only). -->
<template is="dom-if" if="[[showCellularSim_(managedProperties_)]]" <template is="dom-if" if="[[showCellularSim_(managedProperties_)]]"
restamp> restamp>
<div class="section single-column"> <div class="cr-section single-column">
<network-siminfo device-state="[[deviceState_]]"> <network-siminfo device-state="[[deviceState_]]">
</network-siminfo> </network-siminfo>
<div> <div>
...@@ -131,7 +130,7 @@ ...@@ -131,7 +130,7 @@
<!-- Choose Mobile Network (Cellular only) --> <!-- Choose Mobile Network (Cellular only) -->
<template is="dom-if" <template is="dom-if"
if="[[showCellularChooseNetwork_(managedProperties_)]]"> if="[[showCellularChooseNetwork_(managedProperties_)]]">
<div class="section single-column"> <div class="cr-section single-column">
<network-choose-mobile device-state="[[deviceState_]]" <network-choose-mobile device-state="[[deviceState_]]"
managed-properties="[[managedProperties_]]"> managed-properties="[[managedProperties_]]">
</network-choose-mobile> </network-choose-mobile>
...@@ -140,7 +139,7 @@ ...@@ -140,7 +139,7 @@
<!-- APN (Cellular only) --> <!-- APN (Cellular only) -->
<template is="dom-if" if="[[isCellular_(managedProperties_)]]"> <template is="dom-if" if="[[isCellular_(managedProperties_)]]">
<div class="section single-column"> <div class="cr-section single-column">
<network-apnlist editable on-apn-change="onApnChange_" <network-apnlist editable on-apn-change="onApnChange_"
managed-properties="[[managedProperties_]]"> managed-properties="[[managedProperties_]]">
</network-apnlist> </network-apnlist>
...@@ -148,7 +147,7 @@ ...@@ -148,7 +147,7 @@
</template> </template>
<!-- Proxy --> <!-- Proxy -->
<div class="section single-column"> <div class="cr-section single-column">
<template is="dom-if" <template is="dom-if"
if="[[shouldShowProxyPolicyIndicator_(managedProperties_)]]"> if="[[shouldShowProxyPolicyIndicator_(managedProperties_)]]">
<div class="property-box"> <div class="property-box">
...@@ -166,14 +165,14 @@ ...@@ -166,14 +165,14 @@
<template is="dom-if" if="[[isRememberedOrConnected_(managedProperties_)]]"> <template is="dom-if" if="[[isRememberedOrConnected_(managedProperties_)]]">
<!-- IP Config --> <!-- IP Config -->
<div class="section single-column"> <div class="cr-section single-column">
<network-ip-config editable on-ip-change="onIPConfigChange_" <network-ip-config editable on-ip-change="onIPConfigChange_"
managed-properties="[[managedProperties_]]"> managed-properties="[[managedProperties_]]">
</network-ip-config> </network-ip-config>
</div> </div>
<!-- Nameservers --> <!-- Nameservers -->
<div class="section single-column"> <div class="cr-section single-column">
<network-nameservers editable <network-nameservers editable
on-nameservers-change="onIPConfigChange_" on-nameservers-change="onIPConfigChange_"
managed-properties="[[managedProperties_]]"> managed-properties="[[managedProperties_]]">
...@@ -181,7 +180,7 @@ ...@@ -181,7 +180,7 @@
</div> </div>
</template> </template>
<div class="section single-column indented"> <div class="cr-section single-column indented">
<!-- MAC Address. --> <!-- MAC Address. -->
<div class="property-box single-column two-line" <div class="property-box single-column two-line"
hidden$="[[!deviceState_.macAddress]]"> hidden$="[[!deviceState_.macAddress]]">
......
...@@ -11,10 +11,9 @@ ...@@ -11,10 +11,9 @@
} }
.property-box { .property-box {
@apply --cr-section; align-items: center;
border-top: none; display: flex;
min-height: var(--cr-section-min-height); min-height: var(--cr-section-min-height);
padding: 0;
} }
.property-box.hr { .property-box.hr {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment