From 65a3aa0cc75856691c0f0004598f625815cbb26e Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 19 Feb 2014 23:05:42 -0800 Subject: [PATCH] Remove phui-box-inner Summary: When we removed the shadow, we no longer needed two containers. Test Plan: Browsed Box example, a diff, a task, and other random pages. Grep for phui-box-inner, not used elsewhere. Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8281 --- resources/celerity/map.php | 4 ++-- src/view/phui/PHUIBoxView.php | 20 +++++--------------- webroot/rsrc/css/phui/phui-box.css | 3 --- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 689995e951..2b3d84efae 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -123,7 +123,7 @@ return array( 'rsrc/css/layout/phabricator-hovercard-view.css' => '67c12b16', 'rsrc/css/layout/phabricator-side-menu-view.css' => '503699d0', 'rsrc/css/layout/phabricator-source-code-view.css' => '62a99814', - 'rsrc/css/phui/phui-box.css' => '6c21bd6a', + 'rsrc/css/phui/phui-box.css' => '1a82a4ae', 'rsrc/css/phui/phui-button.css' => '8784a966', 'rsrc/css/phui/phui-calendar-month.css' => '3474d15a', 'rsrc/css/phui/phui-document.css' => '143b2ac8', @@ -735,7 +735,7 @@ return array( 'phortune-credit-card-form-css' => 'b25b4beb', 'phrequent-css' => 'ffc185ad', 'phriction-document-css' => 'b0309d8e', - 'phui-box-css' => '6c21bd6a', + 'phui-box-css' => '1a82a4ae', 'phui-button-css' => '8784a966', 'phui-calendar-month-css' => '3474d15a', 'phui-document-view-css' => '143b2ac8', diff --git a/src/view/phui/PHUIBoxView.php b/src/view/phui/PHUIBoxView.php index 45d855c9c5..4a0653a3ab 100644 --- a/src/view/phui/PHUIBoxView.php +++ b/src/view/phui/PHUIBoxView.php @@ -22,6 +22,7 @@ final class PHUIBoxView extends AphrontTagView { } protected function getTagAttributes() { + require_celerity_resource('phui-box-css'); $outer_classes = array(); $outer_classes[] = 'phui-box'; if ($this->border) { @@ -30,7 +31,9 @@ final class PHUIBoxView extends AphrontTagView { foreach ($this->margin as $margin) { $outer_classes[] = $margin; } - + foreach ($this->padding as $padding) { + $outer_classes[] = $padding; + } return array('class' => $outer_classes); } @@ -39,19 +42,6 @@ final class PHUIBoxView extends AphrontTagView { } public function getTagContent() { - require_celerity_resource('phui-box-css'); - - $inner_classes = array(); - $inner_classes[] = 'phui-box-inner'; - foreach ($this->padding as $padding) { - $inner_classes[] = $padding; - } - - return phutil_tag( - 'div', - array( - 'class' => implode(' ', $inner_classes) - ), - $this->renderChildren()); + return $this->renderChildren(); } } diff --git a/webroot/rsrc/css/phui/phui-box.css b/webroot/rsrc/css/phui/phui-box.css index aa58be3d26..bf96793454 100644 --- a/webroot/rsrc/css/phui/phui-box.css +++ b/webroot/rsrc/css/phui/phui-box.css @@ -5,9 +5,6 @@ .phui-box-border { border: 1px solid {$lightblueborder}; border-bottom: 1px solid {$blueborder}; -} - -.phui-box-border .phui-box-inner { background-color: #fff; }