Commit 1b307437 authored by proberge's avatar proberge Committed by Commit Bot

Chrome Settings: minor fix to settings_toggle_button padding

When using a settings-toggle-button with a sub-label whose contents can
fit into one or two lines depending on screen resolution, there was no
way to get consistent vertical padding.

This change explicitly sets padding inside of the settings_toggle_button's
outerRow element in order to guarantee padding for the item.

This has the negative side-effect of causing the
settings-toggle-button to expand vertically if the window is resized such that
the sub-label text overflows to a new line.

Bug: 803683
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: Iff644e6efb4aa293f4ae41e9035a961578d576f0
Reviewed-on: https://chromium-review.googlesource.com/1133300Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: proberge <proberge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574423}
parent 803005b5
...@@ -19,10 +19,6 @@ ...@@ -19,10 +19,6 @@
border-top: none; border-top: none;
} }
:host(.three-line) {
min-height: var(--settings-row-three-line-min-height);
}
:host([elide-label]), :host([elide-label]),
:host([elide-label]) #outerRow, :host([elide-label]) #outerRow,
:host([elide-label]) #outerRow > div.flex { :host([elide-label]) #outerRow > div.flex {
...@@ -35,8 +31,10 @@ ...@@ -35,8 +31,10 @@
#outerRow { #outerRow {
align-items: center; align-items: center;
box-sizing: border-box;
display: flex; display: flex;
min-height: var(--settings-row-two-line-min-height); min-height: var(--settings-row-two-line-min-height);
padding: 12px 0;
width: 100%; width: 100%;
} }
......
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
</div> </div>
</template> </template>
<settings-toggle-button id="autosigninCheckbox" <settings-toggle-button id="autosigninCheckbox"
class="three-line"
pref="{{prefs.credentials_enable_autosignin}}" pref="{{prefs.credentials_enable_autosignin}}"
label="$i18n{passwordsAutosigninLabel}" label="$i18n{passwordsAutosigninLabel}"
sub-label="$i18n{passwordsAutosigninDescription}"> sub-label="$i18n{passwordsAutosigninDescription}">
......
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