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