Sha256: 6f68eef64aeb367740c4edbfac1f72112c9034d7ed12abb472c2de5fb11a251d

Contents?: true

Size: 1.54 KB

Versions: 11

Compression:

Stored size: 1.54 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: $badge-font-size;
    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

11 entries across 11 versions & 1 rubygems

Version Path
material_design_lite-sass-1.0.6.3 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.6.2 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.6.1 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.6 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.5 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.4.2 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.4.1 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.4 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.3.2 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.3.1 vendor/assets/stylesheets/material/_badge.scss
material_design_lite-sass-1.0.3 vendor/assets/stylesheets/material/_badge.scss