Skip to content

Commit

Permalink
[Tag] fix line-height for centering (#3117)
Browse files Browse the repository at this point in the history
* fix lint error

* set tag line-height to icon size

* $tag-line-height(-large) vars
  • Loading branch information
giladgray authored Nov 1, 2018
1 parent 567dd08 commit f8c0b73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/common/_flex.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@

// CSS API support
&::before,
// space after all children
> * {
// space after all children
#{$margin-prop}: $margin;
}

Expand Down
8 changes: 6 additions & 2 deletions packages/core/src/components/tag/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -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 {
Expand Down

1 comment on commit f8c0b73

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Tag] fix line-height for centering (#3117)

Previews: documentation | landing | table

Please sign in to comment.