Commit d72126c9 authored by Randall Leeds's avatar Randall Leeds

Make top bar style consistent with toolbar

Harmonize the styles of the buttons in the top bar and the toolbar.

- Match font size of icons at 18px
- Buttons are .btn-clean and have minimum width so icons are square
- Transitions for background color
- Simplify the styles for the top bar, using the newly consistent
  clean top bar button styles instead of specific styles for the
  share button.
parent 249298d2
...@@ -30,12 +30,12 @@ module.exports = ['$http', '$parse', ($http, $parse) -> ...@@ -30,12 +30,12 @@ module.exports = ['$http', '$parse', ($http, $parse) ->
<input class="simple-search-input" type="text" ng-model="searchtext" name="searchText" <input class="simple-search-input" type="text" ng-model="searchtext" name="searchText"
placeholder="{{loading && 'Loading' || 'Search'}}…" placeholder="{{loading && 'Loading' || 'Search'}}…"
ng-disabled="loading" /> ng-disabled="loading" />
<span class="simple-search-icon" ng-hide="loading"> <button class="simple-search-icon btn btn-clean" ng-hide="loading">
<i class="h-icon-search"></i> <i class="h-icon-search btn-icon"></i>
</span> </button>
<span class="simple-search-icon" ng-show="loading"> <button class="simple-search-icon btn btn-clean" ng-show="loading" disabled>
<i class="spinner"></i> <span class="btn-icon"><span class="spinner"></span></span>
</span> </button>
</form> </form>
''' '''
] ]
...@@ -110,22 +110,6 @@ html { ...@@ -110,22 +110,6 @@ html {
} }
} }
// Share this view /////////////////////
.share-dialog-toggle {
top: 1px;
left: 8px;
position: relative;
cursor: pointer;
color: $gray-light;
float: left;
margin-right: 15px;
&:hover {
color: $gray-dark;
}
}
.share-links { .share-links {
a { a {
font-size: 1.5em; font-size: 1.5em;
......
...@@ -238,7 +238,8 @@ ...@@ -238,7 +238,8 @@
} }
.btn-clean { .btn-clean {
&, &:focus, &:hover, &:active, &.js-hover, &.js-focus, &.js-active { &, &:focus, &:hover, &:active, &[disabled],
&.js-hover, &.js-focus, &.js-active, &.js-disabled {
@include box-shadow(none); @include box-shadow(none);
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
...@@ -253,6 +254,10 @@ ...@@ -253,6 +254,10 @@
&:active, &.js-active { &:active, &.js-active {
color: $link-color-hover; color: $link-color-hover;
} }
&[disabled], &.js-disabled {
color: $text-color;
}
} }
// Positions the icon nicely within the button. // Positions the icon nicely within the button.
......
@import "base.scss"; @import "base.scss";
@import "mixins/icons"; @import "mixins/icons";
.simple-search {
overflow: hidden;
}
.simple-search-form { .simple-search-form {
@include clearfix; @include clearfix;
position: relative; position: relative;
padding: 0 1.5385em; padding: 0 2em;
color: $gray-darker; color: $gray-dark;
}
.simple-search-form * {
line-height: inherit;
} }
.simple-search-icon { .simple-search-icon {
...@@ -27,7 +19,6 @@ ...@@ -27,7 +19,6 @@
} }
input.simple-search-input { input.simple-search-input {
float: left;
outline: none; outline: none;
color: $text-color; color: $text-color;
width: 100%; width: 100%;
......
...@@ -6,42 +6,42 @@ ...@@ -6,42 +6,42 @@
border: solid 1px $gray-lighter; border: solid 1px $gray-lighter;
border-style: solid none; border-style: solid none;
height: 30px; height: 30px;
line-height: 28px;
position: fixed; position: fixed;
left: 0; left: 0;
right: 0; right: 0;
top: 0; top: 0;
z-index: 5; z-index: 5;
.barbutton { .inner {
&:hover { * {
@include box-shadow(inset 0 1px 3px hsla(0, 0%, 0%, .1)); font-size: 14px;
line-height: 28px;
.btn-icon {
font-size: 18px;
}
} }
&:active { @include respond-to(wide-handhelds handhelds) {
@include box-shadow(inset 0 2px 3px hsla(0, 0%, 0%, .1)); margin: 0 .72em;
} }
} }
}
.inner { .topbar .btn {
margin: 0 auto; color: $gray-light;
max-width: $break-tablet; height: 28px;
padding: 0 4em; min-width: 28px;
position: relative;
@include respond-to(wide-handhelds handhelds) { border: 0;
padding-left: 0; padding: 0;
padding-right: 0;
}
&.pull-right { &:active, .js-active {
display: inline-block; @include single-transition(background-color, .25s);
font-family: $sans-font-family; background-color: $gray-light;
} }
& > *:first-child, & > *:last-child { &:focus, .js-focus, &:hover, .js-hover {
line-height: 28px; color: $gray-dark;
margin: 0 .72em;
}
} }
} }
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