Text
+ I am in a span + Me too +Right margin is set automatically, top margin is left to you - it depends too much on the situation
+diff --git a/src/badge/_badge.scss b/src/badge/_badge.scss index abc02b3c..fb000268 100644 --- a/src/badge/_badge.scss +++ b/src/badge/_badge.scss @@ -1,67 +1,66 @@ -//--- -// Copyright (c) 2015, Michael Mitterer (office@mikemitterer.at), -// IT-Consulting and Development Limited. -// -// 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. -// +/** + * 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); + position : relative; + white-space: nowrap; + margin-right: ($badge-size + $badge-padding); - &:not([data-badge]) { - margin-right: auto; + &: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: space-between; + 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: 400; + font-size: 10px; + width: $badge-size; + height: $badge-size; + border-radius : 50%; + + background: $badge-background; + color: $badge-color; + } + + &.mdl-badge--no-background { &[data-badge]:after { - content : attr(data-badge); + color: $badge-color-inverse; + background: $badge-background-inverse; - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; - align-content: space-between; - align-items: center; - - position : absolute; - top : -($badge-size / 2); - right : -($badge-size + $badge-padding); - - .mdl-button & { - top : -10px; - right : -5px; - } - - font-size : 10px; - 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; - } + box-shadow: 0 0 1px gray; } + } } diff --git a/src/badge/demo.html b/src/badge/demo.html index b909ad54..a189a421 100644 --- a/src/badge/demo.html +++ b/src/badge/demo.html @@ -14,84 +14,47 @@
Right margin is set automatically, top margin is left to you - it depends too much on the situation
+Right margin is set automatically, top margin is left to you - it depends to much on the situation
-