Commit 042ed543 authored by Randall Leeds's avatar Randall Leeds

Use scale instead of font-size for icon scaling

This is much neater. Since the scale origin is the center of the
icon this will scale around the center of the line, avoiding any
messy vertical alignment nonsense. This works much better than
vertical-align middle and font-size because vertical-align middle
puts the center of the element at the x-height, rather than the
middle of the line. This is much cleaner.
parent 0296ca08
...@@ -256,15 +256,9 @@ ...@@ -256,15 +256,9 @@
} }
} }
.btn-text {
display: inline-block;
vertical-align: middle;
}
.btn-icon { .btn-icon {
display: inline-block; display: inline-block;
font-size: 1.4em; transform: scale(1.2);
vertical-align: middle;
} }
// Positions a message/icon to the left of a button. // Positions a message/icon to the left of a button.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
border: solid 1px $gray-lighter; border: solid 1px $gray-lighter;
border-style: solid none; border-style: solid none;
height: 30px; height: 30px;
font-size: 14px; font-size: 15px;
position: fixed; position: fixed;
left: 0; left: 0;
right: 0; right: 0;
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
.topbar .btn { .topbar .btn {
color: $gray-light; color: $gray-light;
min-width: 28px; min-width: 28px;
height: 28px;
border: 0; border: 0;
padding: 0; padding: 0;
......
...@@ -125,20 +125,16 @@ ...@@ -125,20 +125,16 @@
<div class="form-actions-buttons form-actions-left"> <div class="form-actions-buttons form-actions-left">
<button ng-switch-when="edit" <button ng-switch-when="edit"
ng-click="vm.save()" ng-click="vm.save()"
class="btn"><i class="h-icon-check btn-icon"></i> class="btn"><i class="h-icon-check btn-icon"></i> Save</button>
<span class="btn-text">Save</span></button>
<button ng-switch-when="delete" <button ng-switch-when="delete"
ng-click="vm.save()" ng-click="vm.save()"
class="btn"><i class="h-icon-check btn-icon"></i> class="btn"><i class="h-icon-check btn-icon"></i> Delete</button>
<span clas="btn-text">Delete</span></button>
<button ng-switch-default <button ng-switch-default
ng-click="vm.save()" ng-click="vm.save()"
class="btn"><i class="h-icon-check btn-icon"></i> class="btn"><i class="h-icon-check btn-icon"></i> Save</button>
<span class="btn-text">Save</span></button>
<button class="btn btn-clean" <button class="btn btn-clean"
ng-click="vm.revert()" ng-click="vm.revert()"
><i class="h-icon-cancel btn-icon"></i> ><i class="h-icon-cancel btn-icon"></i> Cancel</button>
<span class="btn-text">Cancel</span></button>
</div> </div>
</div> </div>
...@@ -161,13 +157,11 @@ ...@@ -161,13 +157,11 @@
<div class="annotation-actions" ng-if="!vm.editing && vm.annotation.id"> <div class="annotation-actions" ng-if="!vm.editing && vm.annotation.id">
<button class="small btn btn-clean" <button class="small btn btn-clean"
ng-click="vm.reply()" ng-click="vm.reply()"
><i class="h-icon-reply btn-icon"></i> ><i class="h-icon-reply btn-icon"></i> Reply</button>
<span class="btn-text">Reply</span></button>
<span class="share-dialog-wrapper"> <span class="share-dialog-wrapper">
<button class="small btn btn-clean" <button class="small btn btn-clean"
ng-click="share($event)" ng-click="share($event)"
><i class="h-icon-link btn-icon"></i> ><i class="h-icon-link btn-icon"></i> Link</button>
<span class="btn-text">Link</span></button>
<span class="share-dialog" ng-click="$event.stopPropagation()"> <span class="share-dialog" ng-click="$event.stopPropagation()">
<a target="_blank" <a target="_blank"
class="h-icon-link" class="h-icon-link"
...@@ -179,13 +173,11 @@ ...@@ -179,13 +173,11 @@
<button class="small btn btn-clean" <button class="small btn btn-clean"
ng-show="vm.authorize('update')" ng-show="vm.authorize('update')"
ng-click="vm.edit()" ng-click="vm.edit()"
><i class="h-icon-edit btn-icon"></i> ><i class="h-icon-edit btn-icon"></i> Edit</button>
<span class="btn-text">Edit</span></button>
<button class="small btn btn-clean" <button class="small btn btn-clean"
ng-show="vm.authorize('delete')" ng-show="vm.authorize('delete')"
ng-click="vm.delete()" ng-click="vm.delete()"
><i class="h-icon-delete btn-icon"></i> ><i class="h-icon-delete btn-icon"></i> Delete…</button>
<span class="btn-text">Delete…</span></button>
</div> </div>
</footer> </footer>
</div> </div>
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