Shrink height of gr-edit-file-controls
The component that provides edit file controls is taller than the file
list row, causing a reflow of the UI when editLoaded is toggled. To
shrink this component, the height of the buttons inside was reduced. A
mixin was added to gr-dropdown to accomplish this.
Change-Id: I9dcc13a5cac6058d9ed78e4211b9ba86c0e66a60
diff --git a/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls.html b/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls.html
index f0d7f6f..96ba196b 100644
--- a/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls.html
+++ b/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls.html
@@ -37,6 +37,12 @@
#more {
margin-right: 1em;
}
+ gr-button,
+ gr-dropdown {
+ --gr-button: {
+ height: 1.8em;
+ }
+ }
gr-dropdown {
--gr-dropdown-item: {
background-color: transparent;
diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.html b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.html
index 6d7df94..62da3bb 100644
--- a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.html
+++ b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.html
@@ -37,11 +37,8 @@
background-color: #fff;
box-shadow: 0 1px 5px rgba(0, 0, 0, .3);
}
- button {
- background: none;
- border: none;
- font: inherit;
- padding: .3em 0;
+ gr-button {
+ @apply --gr-button;
}
gr-avatar {
height: 2em;