From bce3d7bb9bc0696fbfd4a1481ec970573e67fb8a Mon Sep 17 00:00:00 2001 From: Igor Guastalla de Lima Date: Wed, 2 Jan 2019 22:31:50 -0200 Subject: [PATCH] feat: add badges into index.html and some corrections to support it --- index.html | 37 +++++++++++++++++++++++++++++++++++++ scss/elements/badges.scss | 16 +++++++++------- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 3d4e519..14133c9 100644 --- a/index.html +++ b/index.html @@ -272,6 +272,43 @@ +
+

Badges

+ + NES.css + + + is + + + a + + + great + + + framework! + + + npm + 1.1.0 + + + test + 100% + + + + + + Icons + + + hi + Text + +
+

Icons

diff --git a/scss/elements/badges.scss b/scss/elements/badges.scss index 38d6c98..1ac1286 100644 --- a/scss/elements/badges.scss +++ b/scss/elements/badges.scss @@ -1,8 +1,11 @@ @mixin span-style-is-icon($color, $background-color, $display, $width, $font-size) { display: $display; + align-items: center; + justify-content: center; width: $width; font-size: $font-size; color: $color; + text-align: center; background-color: $background-color; } @@ -11,6 +14,7 @@ top: 0; width: $width; color: $color; + text-align: center; background-color: $background; @if $option == left { @@ -39,9 +43,8 @@ @include span-style-is-icon($color, $background, flex, 2.7em, 0.5em); position: absolute; - top: -1.7em; - left: 2.5em; - align-items: center; + top: -2.8em; + left: -2.7em; height: 2.7em; } &:last-child { @@ -65,13 +68,11 @@ position: relative; display: inline-block; width: $em * 14; - height: $em; - padding: 0.75em; + height: $em * 2.5; margin: 0.5em; font-size: $em * 1.2; - text-align: center; white-space: nowrap; - vertical-align: middle; + vertical-align: top; user-select: none; // Other styles @@ -91,6 +92,7 @@ } &.is-icon { + width: $em * 7; & span.is-#{nth($type, 1)} { @include badge-style(nth($type, 2), nth($type, 3), is-icon); }