liquid_feedback_frontend
view style/mdl/badge/_badge.scss @ 1711:f2922928b9a7
Allow to hide link to other units
| author | bsw | 
|---|---|
| date | Mon Sep 27 12:13:12 2021 +0200 (2021-09-27) | 
| parents | 32cc544d5a5b | 
| children | 
 line source
     1 /**
     2  * Copyright 2015 Google Inc. All Rights Reserved.
     3  *
     4  * Licensed under the Apache License, Version 2.0 (the "License");
     5  * you may not use this file except in compliance with the License.
     6  * You may obtain a copy of the License at
     7  *
     8  *      http://www.apache.org/licenses/LICENSE-2.0
     9  *
    10  * Unless required by applicable law or agreed to in writing, software
    11  * distributed under the License is distributed on an "AS IS" BASIS,
    12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  * See the License for the specific language governing permissions and
    14  * limitations under the License.
    15  */
    17 @import "../variables";
    19 .mdl-badge {
    20   position : relative;
    21   white-space: nowrap;
    22   margin-right: ($badge-size + $badge-padding);
    24   &:not([data-badge]) {
    25     margin-right: auto;
    26   }
    28   &[data-badge]:after {
    29     content: attr(data-badge);
    31     display: flex;
    32     flex-direction: row;
    33     flex-wrap: wrap;
    34     justify-content: center;
    35     align-content: center;
    36     align-items: center;
    38     position: absolute;
    39     top: -($badge-size / 2);
    40     right: -($badge-size + $badge-padding);
    42     .mdl-button & {
    43       top: -10px;
    44       right: -5px;
    45     }
    47     font-family: $preferred_font;
    48     font-weight: 600;
    49     font-size: $badge-font-size;
    50     width: $badge-size;
    51     height: $badge-size;
    52     border-radius : 50%;
    54     background: $badge-background;
    55     color: $badge-color;
    56   }
    58   &.mdl-badge--no-background {
    59     &[data-badge]:after {
    60       color: $badge-color-inverse;
    61       background: $badge-background-inverse;
    63       box-shadow: 0 0 1px gray;
    64     }
    65   }
    66   &.mdl-badge--overlap {
    67     margin-right: ($badge-size - $badge-overlap);
    68     &:after {
    69       right: -($badge-size - $badge-overlap);
    70     }
    71   }
    72 }
