Make icons in tags more floaty, less absoluty

Summary: This change wraps the icon inline with the text, so smaller width icons have equal spacing between the border and text.

Test Plan:
review a number of different tag with icons, also UIExamples.

{F309048}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11802
This commit is contained in:
Chad Little
2015-02-18 11:28:11 -08:00
parent f9638edf37
commit eefead7721
3 changed files with 11 additions and 21 deletions

View File

@@ -176,7 +176,7 @@ final class PHUITagView extends AphrontTagView {
array(
'class' => 'phui-tag-core '.$color,
),
array($dot, $this->name));
array($dot, $icon, $this->name));
if ($this->closed) {
$content = phutil_tag(
@@ -184,10 +184,10 @@ final class PHUITagView extends AphrontTagView {
array(
'class' => 'phui-tag-core-closed',
),
$content);
array($icon, $content));
}
return array($icon, $content);
return $content;
}
public static function getTagTypes() {