From 4ed5fa77ffecde9ce46c10d4d03c48e6e481ceba Mon Sep 17 00:00:00 2001 From: Ameya Pandilwar Date: Thu, 11 Feb 2016 03:54:30 -0500 Subject: Rename .label class to .tag --- scss/_labels.scss | 79 ------------------------------------------------- scss/_mixins.scss | 2 +- scss/_print.scss | 2 +- scss/_tags.scss | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ scss/_variables.scss | 24 +++++++-------- scss/bootstrap.scss | 2 +- scss/mixins/_label.scss | 11 ------- scss/mixins/_tag.scss | 11 +++++++ 8 files changed, 105 insertions(+), 105 deletions(-) delete mode 100644 scss/_labels.scss create mode 100644 scss/_tags.scss delete mode 100644 scss/mixins/_label.scss create mode 100644 scss/mixins/_tag.scss (limited to 'scss') diff --git a/scss/_labels.scss b/scss/_labels.scss deleted file mode 100644 index 6dec51608..000000000 --- a/scss/_labels.scss +++ /dev/null @@ -1,79 +0,0 @@ -// Base class -// -// Requires one of the contextual, color modifier classes for `color` and -// `background-color`. - -.label { - display: inline-block; - padding: .25em .4em; - font-size: 75%; - font-weight: $label-font-weight; - line-height: 1; - color: $label-color; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - @include border-radius(); - - // Empty labels collapse automatically - &:empty { - display: none; - } -} - -// Quick fix for labels in buttons -.btn .label { - position: relative; - top: -1px; -} - -// scss-lint:disable QualifyingElement -// Add hover effects, but only for links -a.label { - @include hover-focus { - color: $label-link-hover-color; - text-decoration: none; - cursor: pointer; - } -} -// scss-lint:enable QualifyingElement - -// Pill labels -// -// Make them extra rounded with a modifier to replace v3's badges. - -.label-pill { - padding-right: .6em; - padding-left: .6em; - // Use a higher than normal value to ensure completely rounded edges when - // customizing padding or font-size on labels. - @include border-radius(10rem); -} - -// Colors -// -// Contextual variations (linked labels get darker on :hover). - -.label-default { - @include label-variant($label-default-bg); -} - -.label-primary { - @include label-variant($label-primary-bg); -} - -.label-success { - @include label-variant($label-success-bg); -} - -.label-info { - @include label-variant($label-info-bg); -} - -.label-warning { - @include label-variant($label-warning-bg); -} - -.label-danger { - @include label-variant($label-danger-bg); -} diff --git a/scss/_mixins.scss b/scss/_mixins.scss index 5c8651207..1b5bf0fae 100644 --- a/scss/_mixins.scss +++ b/scss/_mixins.scss @@ -18,7 +18,7 @@ @import "mixins/breakpoints"; @import "mixins/hover"; @import "mixins/image"; -@import "mixins/label"; +@import "mixins/tag"; @import "mixins/reset-filter"; @import "mixins/resize"; @import "mixins/screen-reader"; diff --git a/scss/_print.scss b/scss/_print.scss index d569cce4d..b2c93735c 100644 --- a/scss/_print.scss +++ b/scss/_print.scss @@ -92,7 +92,7 @@ border-top-color: #000 !important; } } - .label { + .tag { border: $border-width solid #000; } diff --git a/scss/_tags.scss b/scss/_tags.scss new file mode 100644 index 000000000..fde812905 --- /dev/null +++ b/scss/_tags.scss @@ -0,0 +1,79 @@ +// Base class +// +// Requires one of the contextual, color modifier classes for `color` and +// `background-color`. + +.tag { + display: inline-block; + padding: .25em .4em; + font-size: 75%; + font-weight: $tag-font-weight; + line-height: 1; + color: $tag-color; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + @include border-radius(); + + // Empty labels collapse automatically + &:empty { + display: none; + } +} + +// Quick fix for labels in buttons +.btn .tag { + position: relative; + top: -1px; +} + +// scss-lint:disable QualifyingElement +// Add hover effects, but only for links +a.tag { + @include hover-focus { + color: $tag-link-hover-color; + text-decoration: none; + cursor: pointer; + } +} +// scss-lint:enable QualifyingElement + +// Pill labels +// +// Make them extra rounded with a modifier to replace v3's badges. + +.tag-pill { + padding-right: .6em; + padding-left: .6em; + // Use a higher than normal value to ensure completely rounded edges when + // customizing padding or font-size on labels. + @include border-radius(10rem); +} + +// Colors +// +// Contextual variations (linked labels get darker on :hover). + +.tag-default { + @include tag-variant($tag-default-bg); +} + +.tag-primary { + @include tag-variant($tag-primary-bg); +} + +.tag-success { + @include tag-variant($tag-success-bg); +} + +.tag-info { + @include tag-variant($tag-info-bg); +} + +.tag-warning { + @include tag-variant($tag-warning-bg); +} + +.tag-danger { + @include tag-variant($tag-danger-bg); +} diff --git a/scss/_variables.scss b/scss/_variables.scss index 1d7c67004..d60330a86 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -607,18 +607,18 @@ $popover-arrow-outer-width: ($popover-arrow-width + 1px) !default; $popover-arrow-outer-color: fade-in($popover-border-color, .05) !default; -// Labels - -$label-default-bg: $gray-light !default; -$label-primary-bg: $brand-primary !default; -$label-success-bg: $brand-success !default; -$label-info-bg: $brand-info !default; -$label-warning-bg: $brand-warning !default; -$label-danger-bg: $brand-danger !default; - -$label-color: #fff !default; -$label-link-hover-color: #fff !default; -$label-font-weight: bold !default; +// Tags + +$tag-default-bg: $gray-light !default; +$tag-primary-bg: $brand-primary !default; +$tag-success-bg: $brand-success !default; +$tag-info-bg: $brand-info !default; +$tag-warning-bg: $brand-warning !default; +$tag-danger-bg: $brand-danger !default; + +$tag-color: #fff !default; +$tag-link-hover-color: #fff !default; +$tag-font-weight: bold !default; // Modals diff --git a/scss/bootstrap.scss b/scss/bootstrap.scss index ef30c6b63..f99a722ca 100644 --- a/scss/bootstrap.scss +++ b/scss/bootstrap.scss @@ -34,7 +34,7 @@ @import "card"; @import "breadcrumb"; @import "pagination"; -@import "labels"; +@import "tags"; @import "jumbotron"; @import "alert"; @import "progress"; diff --git a/scss/mixins/_label.scss b/scss/mixins/_label.scss deleted file mode 100644 index 4bc48c60d..000000000 --- a/scss/mixins/_label.scss +++ /dev/null @@ -1,11 +0,0 @@ -// Labels - -@mixin label-variant($color) { - background-color: $color; - - &[href] { - @include hover-focus { - background-color: darken($color, 10%); - } - } -} diff --git a/scss/mixins/_tag.scss b/scss/mixins/_tag.scss new file mode 100644 index 000000000..900c54e36 --- /dev/null +++ b/scss/mixins/_tag.scss @@ -0,0 +1,11 @@ +// Tags + +@mixin tag-variant($color) { + background-color: $color; + + &[href] { + @include hover-focus { + background-color: darken($color, 10%); + } + } +} -- cgit v1.2.3