Sha256: cb755063ca6bc9eae946fdf048e41673948562c31861c6e03c88d572bfc55ea0

Contents?: true

Size: 1.31 KB

Versions: 35

Compression:

Stored size: 1.31 KB

Contents

// Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source

////
/// @group badge
////

/// Default background color for badges.
/// @type Color
$badge-background: $primary-color !default;

/// Default text color for badges.
/// @type Color
$badge-color: $white !default;

/// Alternate text color for badges.
/// @type Color
$badge-color-alt: $black !default;

/// Coloring classes. A map of classes to output in your CSS, like `.secondary`, `.success`, and so on.
/// @type Map
$badge-palette: $foundation-palette !default;

/// Default padding inside badges.
/// @type Number
$badge-padding: 0.3em !default;

/// Minimum width of a badge.
/// @type Number
$badge-minwidth: 2.1em !default;

/// Default font size for badges.
/// @type Number
$badge-font-size: 0.6rem !default;

/// Generates the base styles for a badge.
@mixin badge {
  display: inline-block;
  min-width: $badge-minwidth;
  padding: $badge-padding;

  border-radius: 50%;

  font-size: $badge-font-size;
  text-align: center;
}

@mixin foundation-badge {
  .badge {
    @include badge;

    background: $badge-background;
    color: $badge-color;

    @each $name, $color in $badge-palette {
      &.#{$name} {
        background: $color;
        color: color-pick-contrast($color, ($badge-color, $badge-color-alt));
      }
    }
  }
}

Version data entries

35 entries across 35 versions & 7 rubygems

Version Path
bedrock_sass-0.2.2 assets/_vendor/foundation/scss/components/_badge.scss
foundation-rails-6.6.1.0 vendor/assets/scss/components/_badge.scss
foundation-rails-6.5.3.0 vendor/assets/scss/components/_badge.scss
bedrock_sass-0.2.1 assets/_vendor/foundation/scss/components/_badge.scss
foundation-rails-6.5.1.0 vendor/assets/scss/components/_badge.scss
locomotivecms_wagon-2.4.1 generators/foundation/public/stylesheets/foundation6/components/_badge.scss
bedrock_sass-0.2.0 assets/_vendor/foundation/scss/components/_badge.scss
locomotivecms_wagon-2.4.0 generators/foundation/public/stylesheets/foundation6/components/_badge.scss
foundation-rails-6.4.3.0 vendor/assets/scss/components/_badge.scss
bedrock_sass-0.1.9 assets/_vendor/foundation/scss/components/_badge.scss
bedrock_sass-0.1.8 assets/_vendor/foundation/scss/components/_badge.scss
bedrock_sass-0.1.7 assets/_vendor/foundation/scss/components/_badge.scss
bedrock_sass-0.1.6 assets/_vendor/foundation/scss/components/_badge.scss
bedrock_sass-0.1.5 assets/_vendor/foundation/scss/components/_badge.scss
bedrock_sass-0.1.4 assets/_vendor/foundation/scss/components/_badge.scss
bedrock_sass-0.1.3 assets/_vendor/foundation/scss/components/_badge.scss
bedrock_sass-0.1.2 assets/_vendor/foundation/scss/components/_badge.scss
foundation-rails-6.4.1.3 vendor/assets/scss/components/_badge.scss
aacinfo-theme-2.0.1 _sass/foundation-sites/scss/components/_badge.scss
jekyll-theme-foundation-0.3.6 _sass/scss/components/_badge.scss