Sha256: c1847e576428bc1d4088cc6767bc3c7dc9173850bb7d04555623f2615104416b

Contents?: true

Size: 1.4 KB

Versions: 39

Compression:

Stored size: 1.4 KB

Contents

@import "../tokens/border_radius";
@import "../tokens/colors";
@import "../tokens/opacity";
@import "../tokens/spacing";
@import "../tokens/typography";

[class^=pb_badge_kit] {
  $pb_badge_height: 18px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: $border_rad_light;
  padding: 0 calc($space_xs/2);
  border-width: 1px;
  border-style: solid;
  border-color: $card_light;
  white-space: nowrap;

  span {
    display: inline-block;
    font-size: $font_smaller - 1;
    font-weight: $bolder;
  }

  @each $color_name, $color_value in $status_colors {
    &[class*=_#{$color_name}]  {
      background: rgba($color_value, $opacity_1);
      color: map-get($status_color_text, $color_name);
    }
  }

  &[class*=_rounded] {
    height: $pb_badge_height;
    min-height: $pb_badge_height;
    min-width: $pb_badge_height;
    border-radius: calc($pb_badge_height / 2);
  }

  &[class*=_notification] {
    background: $primary;
    color: $white;
  }

  &[class*=_notification_error] {
    background: $error;
  }

  &.dark {
    border-width: 0;

    @each $color_name, $color_value in $status_colors {
      &[class*=_#{$color_name}]  {
        background: rgba(mix($bg_dark, $color_value, 10%), $opacity_2);
        color: map-get($status_color_text_dark, $color_name);
      }
    }

    &[class*=_notification_error]  {
      background: $error_dark;
      color: $white;
    }
  }
}

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
playbook_ui-14.3.0.pre.rc.4 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.1.pre.alpha.20240828cikubedbump3702 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.3.0.pre.rc.3 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.1.pre.alpha.PBNTR431fixingduplicatingtextareaclassname3689 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.3.0.pre.rc.2 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.1.pre.alpha.PLAY1516railsiconsfixedwidth3674 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.1.pre.alpha.PBNTR479removeextraspacingfromradiochildren3671 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.3.0.pre.rc.1 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.1.pre.alpha.PBNTR479removeextraspacingfromradiochildren3669 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.1.pre.alpha.pbntr373enablekitsforradio3665 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.1.pre.alpha.bugfixforactionrc3663 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.0.pre.alpha.play1490railsdialogdatafix3649 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.1 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.0.pre.alpha.fixphonenumberinputflag3632 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.0.pre.alpha.fixphonenumberinputflag3631 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.0.pre.alpha.PLAY15063626 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.0.pre.alpha.PLAY15063624 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.0.pre.alpha.play1432playgroundsanitation3622 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.0.pre.alpha.PLAY15063621 app/pb_kits/playbook/pb_badge/_badge.scss
playbook_ui-14.2.0.pre.alpha.PLAY15063620 app/pb_kits/playbook/pb_badge/_badge.scss