From f8c0b73999cf34edbec89106294f051d17a88a71 Mon Sep 17 00:00:00 2001 From: Gilad Gray Date: Thu, 1 Nov 2018 15:34:26 -0700 Subject: [PATCH] [Tag] fix line-height for centering (#3117) * fix lint error * set tag line-height to icon size * $tag-line-height(-large) vars --- packages/core/src/common/_flex.scss | 2 +- packages/core/src/components/tag/_common.scss | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/core/src/common/_flex.scss b/packages/core/src/common/_flex.scss index b44d7db1b4..7dc3090174 100644 --- a/packages/core/src/common/_flex.scss +++ b/packages/core/src/common/_flex.scss @@ -36,8 +36,8 @@ // CSS API support &::before, - // space after all children > * { + // space after all children #{$margin-prop}: $margin; } diff --git a/packages/core/src/components/tag/_common.scss b/packages/core/src/components/tag/_common.scss index 9ac9fd239e..49e6613d36 100644 --- a/packages/core/src/components/tag/_common.scss +++ b/packages/core/src/components/tag/_common.scss @@ -5,12 +5,14 @@ $tag-default-color: $gray1 !default; $dark-tag-default-color: $gray5 !default; $tag-height: $pt-grid-size * 2 !default; -$tag-padding-top: ($tag-height - $pt-icon-size-standard) / 2 !default; +$tag-line-height: $pt-icon-size-standard !default; +$tag-padding-top: ($tag-height - $tag-line-height) / 2 !default; $tag-padding: $tag-padding-top * 3 !default; $tag-margin: ($pt-input-height - $tag-height) / 2 !default; $tag-height-large: $pt-grid-size * 3 !default; -$tag-padding-large: ($tag-height-large - $pt-icon-size-large) !default; +$tag-line-height-large: $pt-icon-size-large !default; +$tag-padding-large: ($tag-height-large - $tag-line-height-large) !default; $tag-icon-spacing: ($tag-height - 12px) / 2 !default; $tag-icon-spacing-large: ($tag-height-large - $pt-icon-size-standard) / 2 !default; @@ -31,6 +33,7 @@ $tag-round-adjustment: 2px !default; max-width: 100%; min-height: $tag-height; padding: $tag-padding-top $tag-padding; + line-height: $tag-line-height; color: $pt-dark-text-color; font-size: $pt-font-size-small; @@ -66,6 +69,7 @@ $tag-round-adjustment: 2px !default; min-width: $tag-height-large; min-height: $tag-height-large; padding: 0 $tag-padding-large; + line-height: $tag-line-height-large; font-size: $pt-font-size; &.#{$ns}-round {