Sha256: f5986059122522ec14a68c1afc31eff2d85d999c0a194cde08201987b25151cf

Contents?: true

Size: 1.29 KB

Versions: 5

Compression:

Stored size: 1.29 KB

Contents

@import "blogelator/bourbon";
@import "blogelator/variables";
@import "blogelator/font-awesome/variables";
@import "blogelator/font-awesome/core";
@import "blogelator/font-awesome/icons";

@mixin blogelator-button($background-color:$base-body-color, $accent-color:$base-accent-color, $icon:"none", $icon-position:"none") {
  background-color: $background-color;
  border: 1px solid $accent-color;
  border-radius: 1.5em;
  color: $accent-color;
  display: block;
  font-weight: bold;
  overflow: hidden;
  position: relative;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  @include transition(all 0.1s linear);

  &:active,
  &:hover {
    background-color: $accent-color;
    color: $background-color;
  }

  @if $icon != "none" {
    $icon-class: "." + $fa-css-prefix + "-" + $icon;
    padding: 0.8em 1.1em;

    &:before {
      @extend .fa;
      height: 1em;
      font-size: 1.3em;
      margin-top: -0.5em;
      position: absolute;
      top: 50%;
    }

    @if $icon-position == "left" {
      padding-left: 2.6em;

      &:before {
        @extend #{$icon-class};
        left: 0.7em;
      }
    } @else if $icon-position == "right" {
      padding-right: 2.6em;

      &:before {
        @extend #{$icon-class};
        right: 0.7em;
      }
    }
  }
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blogelator-0.2.5 app/assets/stylesheets/blogelator/mixins/blogelator_button.scss
blogelator-0.2.4 app/assets/stylesheets/blogelator/mixins/blogelator_button.scss
blogelator-0.2.3 app/assets/stylesheets/blogelator/mixins/blogelator_button.scss
blogelator-0.2.2 app/assets/stylesheets/blogelator/mixins/blogelator_button.scss
blogelator-0.2.1 app/assets/stylesheets/blogelator/mixins/blogelator_button.scss