Commit 079399e8 authored by Robert Knight's avatar Robert Knight

Make 'Post to' button dropdown consistent with new button in groups pages

 * Remove the 'line-height' property from .dropdown-menu-btn that,
   combined with default top/bottom padding for <button> elements
   was causing the button label to be vertically off-center in
   the 'Post to' button.

 * Remove duplication between .primary-action-btn and .dropdown-menu-btn

 * Use $color- variables for palette consistency in .dropdown-menu-btn

T-125
parent 3fafdb8d
......@@ -8,6 +8,7 @@ $base-line-height: 20px;
@import './common';
// components
@import './primary-action-btn';
@import './dropdown-menu-btn';
@import './publish-annotation-btn';
@import './share-link';
......
// the primary action button for a form
.dropdown-menu-btn {
$text-color: #f1f1f1;
$default-background-color: #626262;
$hover-background-color: #3A3A3A;
$text-color: $color-seashell;
$default-background-color: $color-dove-gray;
$hover-background-color: $color-mine-shaft;
$h-padding: 9px;
$height: 35px;
$border-radius: 2px;
$arrow-indicator-width: 26px;
background-color: $default-background-color;
border: 0px;
border-radius: $border-radius;
font-size: $body1-font-size;
font-weight: bold;
height: $height;
position: relative;
user-select: none;
&__btn {
@extend .primary-action-btn;
&__label {
// the label occupies the entire space of the button and
// shows a darker state on hover
width: 100%;
height: 100%;
color: $text-color;
background-color: transparent;
border-radius: $border-radius;
border: none;
line-height: $height;
text-align: left;
padding-left: $h-padding;
padding-right: $arrow-indicator-width + 8px;
text-align: left;
vertical-align: middle;
&:hover:not(:disabled) {
background-color: $hover-background-color;
}
&:disabled {
color: $gray-light;
}
}
// dropdown arrow which reveals the button's associated menu
......@@ -65,7 +42,7 @@
border-bottom-right-radius: $border-radius;
&:hover {
background-color: #3A3A3A;
background-color: $hover-background-color;
}
&:hover &-separator {
......@@ -85,7 +62,7 @@
width: 1px;
height: 15px;
background-color: #818181;
background-color: $color-gray;
}
// the ▼ arrow which reveals the dropdown menu when clicked
......
......@@ -14,6 +14,7 @@ $gray-lightest: #f9f9f9 !default;
$color-mine-shaft: #3A3A3A;
$color-dove-gray: #626262;
$color-gray: #818181;
$color-silver-chalice: #a6a6a6;
$color-silver: #bbb;
$color-alto: #dedede;
......
<div class="dropdown-menu-btn">
<button
class="dropdown-menu-btn__label"
class="dropdown-menu-btn__btn"
ng-bind="label"
ng-click="vm.onClick($event)"
ng-disabled="isDisabled">
......
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