Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(mdButton): fab vertical positioning
Browse files Browse the repository at this point in the history
Affects the following CSS classes:
md-fab-bottom-right
md-fab-bottom-left
md-fab-top-right
md-fab-top-left

Closes #1031. Closes #1032.
  • Loading branch information
PaulMougel authored and ajoslin committed Jan 8, 2015
1 parent dc31ee5 commit 641e227
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ $button-padding: 2px 6px 3px !default;
$button-fab-width: 56px !default;
$button-fab-height: 56px !default;
$button-fab-padding: 16px !default;
$button-fab-toast-offset: $toast-height + $toast-margin !default;

$button-fab-toast-offset: $button-fab-height * 0.75;

/**
* Position a FAB button.
Expand Down Expand Up @@ -47,9 +48,9 @@ $button-fab-toast-offset: $toast-height + $toast-margin !default;
cursor: pointer;
overflow: hidden; // for ink containment

transition: box-shadow $swift-ease-in-out-duration $swift-ease-in-out-timing-function,
background-color $swift-ease-in-out-duration $swift-ease-in-out-timing-function,
transform $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
transition: box-shadow $swift-ease-out-duration $swift-ease-out-timing-function,
background-color $swift-ease-out-duration $swift-ease-out-timing-function,
transform $swift-ease-out-duration $swift-ease-out-timing-function;

&.ng-hide {
transition: none;
Expand All @@ -75,10 +76,10 @@ $button-fab-toast-offset: $toast-height + $toast-margin !default;

&.md-fab {

@include fab-position(bottom-right, auto, $button-fab-width/2, $button-fab-height/2, auto);
@include fab-position(bottom-left, auto, auto, $button-fab-height/2, $button-fab-width/2);
@include fab-position(top-right, $button-fab-height/2, $button-fab-width/2, auto, auto);
@include fab-position(top-left, $button-fab-height/2, auto, auto, $button-fab-width/2);
@include fab-position(bottom-right, auto, ($button-fab-width - $button-fab-padding)/2, ($button-fab-height - $button-fab-padding)/2, auto);
@include fab-position(bottom-left, auto, auto, ($button-fab-height - $button-fab-padding)/2, ($button-fab-width - $button-fab-padding)/2);
@include fab-position(top-right, ($button-fab-height - $button-fab-padding)/2, ($button-fab-width - $button-fab-padding)/2, auto, auto);
@include fab-position(top-left, ($button-fab-height - $button-fab-padding)/2, auto, auto, ($button-fab-width - $button-fab-padding)/2);

z-index: $z-index-fab;

Expand Down

0 comments on commit 641e227

Please sign in to comment.