Sha256: 2841a2a4afa9b7cf78723b9cfe94bcdc71e387b02726e848f031d4ddb717b1b2

Contents?: true

Size: 1.53 KB

Versions: 3

Compression:

Stored size: 1.53 KB

Contents

/**
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import "variables";

.mdl-badge {
  position : relative;
  white-space: nowrap;
  margin-right: ($badge-size + $badge-padding);

  &:not([data-badge]) {
    margin-right: auto;
  }

  &[data-badge]:after {
    content: attr(data-badge);

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    align-items: center;

    position: absolute;
    top: -($badge-size / 2);
    right: -($badge-size + $badge-padding);

    .mdl-button & {
      top: -10px;
      right: -5px;
    }

    font-family: $preferred_font;
    font-weight: 600;
    font-size: 12px;
    width: $badge-size;
    height: $badge-size;
    border-radius : 50%;

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

  &.mdl-badge--no-background {
    &[data-badge]:after {
      color: $badge-color-inverse;
      background: $badge-background-inverse;

      box-shadow: 0 0 1px gray;
    }
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
material_design_lite-sass-1.0.2.1 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.2 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.1 vendor/assets/stylesheets/material/_badge.scss