1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

Have text-less dropdown buttons look better

Summary: Using icons and dropdown buttons without text looks a little wonky, this resets the CSS a bit.

Test Plan: Review button with icon and text, just icon, just test, and dropdowns.

Reviewers: epriestley

Reviewed By: epriestley

Spies: Korvin

Differential Revision: https://secure.phabricator.com/D18461
This commit is contained in:
Chad Little 2017-08-24 11:56:33 -07:00
parent 0a01334172
commit 66613240fa
3 changed files with 15 additions and 4 deletions

View file

@ -9,7 +9,7 @@ return array(
'names' => array(
'conpherence.pkg.css' => 'e68cf1fa',
'conpherence.pkg.js' => 'b5b51108',
'core.pkg.css' => 'fe4effd6',
'core.pkg.css' => 'd254d540',
'core.pkg.js' => '6c085267',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '45951e9e',
@ -127,7 +127,7 @@ return array(
'rsrc/css/layout/phabricator-source-code-view.css' => 'aea41829',
'rsrc/css/phui/button/phui-button-bar.css' => 'f1ff5494',
'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68',
'rsrc/css/phui/button/phui-button.css' => '340f55c1',
'rsrc/css/phui/button/phui-button.css' => 'a37aa3a8',
'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893',
'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600',
'rsrc/css/phui/calendar/phui-calendar-month.css' => '21154caf',
@ -824,7 +824,7 @@ return array(
'phui-big-info-view-css' => 'acc3492c',
'phui-box-css' => '745e881d',
'phui-button-bar-css' => 'f1ff5494',
'phui-button-css' => '340f55c1',
'phui-button-css' => 'a37aa3a8',
'phui-button-simple-css' => '8e1baf68',
'phui-calendar-css' => 'f1ddf11c',
'phui-calendar-day-css' => '572b1893',

View file

@ -58,10 +58,12 @@ final class PHUIButtonExample extends PhabricatorUIExample {
array(
'text' => pht('Comment'),
'icon' => 'fa-comment',
'dropdown' => true,
),
array(
'text' => pht('Give Token'),
'icon' => 'fa-trophy',
'dropdown' => true,
),
array(
'text' => pht('Reverse Time'),
@ -73,9 +75,11 @@ final class PHUIButtonExample extends PhabricatorUIExample {
),
array(
'icon' => 'fa-rocket',
'dropdown' => true,
),
array(
'icon' => 'fa-clipboard',
'dropdown' => true,
),
array(
'icon' => 'fa-upload',
@ -95,7 +99,8 @@ final class PHUIButtonExample extends PhabricatorUIExample {
->setColor(PHUIButtonView::GREY)
->setIcon(idx($spec, 'icon'))
->setText(idx($spec, 'text'))
->addClass(PHUI::MARGIN_SMALL_RIGHT);
->addClass(PHUI::MARGIN_SMALL_RIGHT)
->setDropdown(idx($spec, 'dropdown'));
$copy = idx($spec, 'copy');
if ($copy !== null) {

View file

@ -271,11 +271,17 @@ a.policy-control .phui-button-text {
position: relative;
}
.button.has-icon.dropdown .phui-icon-view {
margin-right: 8px;
margin-left: -2px;
}
.button.has-text .phui-icon-view {
display: inline-block;
position: absolute;
top: 7px;
left: 12px;
margin: 0;
}
.button.icon-last .phui-icon-view {