From 636d169c7fbe86453b2a73123ec80618d58342ce Mon Sep 17 00:00:00 2001 From: Hixie Date: Thu, 14 May 2015 10:21:55 -0700 Subject: [PATCH] [Effen] remove some redundant styles Some of the styles we have aren't really needed, so remove them to make it clearer what we weed to actually support to keep the stocks app running. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1128173007 --- framework/components/button.dart | 4 ---- framework/components/checkbox.dart | 6 +++--- framework/components/floating_action_button.dart | 4 ---- framework/components/menu_item.dart | 6 ------ 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/framework/components/button.dart b/framework/components/button.dart index ccd7ffc14..e4e5f2d56 100644 --- a/framework/components/button.dart +++ b/framework/components/button.dart @@ -8,11 +8,7 @@ import 'material.dart'; class Button extends Component { static final Style _style = new Style(''' - display: inline-flex; - transform: translateX(0); -webkit-user-select: none; - justify-content: center; - align-items: center; height: 36px; min-width: 64px; padding: 0 8px; diff --git a/framework/components/checkbox.dart b/framework/components/checkbox.dart index 4ba3da3a0..1924f5cd6 100644 --- a/framework/components/checkbox.dart +++ b/framework/components/checkbox.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import '../fn.dart'; +import '../layout.dart'; import 'button_base.dart'; import 'dart:sky' as sky; @@ -11,8 +12,6 @@ typedef void ValueChanged(value); class Checkbox extends ButtonBase { static final Style _style = new Style(''' transform: translateX(0); - display: flex; - flex-direction: row; justify-content: center; align-items: center; -webkit-user-select: none; @@ -68,8 +67,9 @@ class Checkbox extends ButtonBase { UINode buildContent() { return new EventListenerNode( - new Container( + new FlexContainer( style: _style, + direction: FlexDirection.Row, children: [ new Container( style: highlight ? _containerHighlightStyle : _containerStyle, diff --git a/framework/components/floating_action_button.dart b/framework/components/floating_action_button.dart index 65dae6b82..b16190f5a 100644 --- a/framework/components/floating_action_button.dart +++ b/framework/components/floating_action_button.dart @@ -11,17 +11,13 @@ class FloatingActionButton extends Component { // TODO(abarth): We need a better way to become a container for absolutely // positioned elements. static final Style _style = new Style(''' - transform: translateX(0); width: 56px; height: 56px; background-color: ${Red[500]}; border-radius: 28px;''' ); static final Style _clipStyle = new Style(''' - transform: translateX(0); position: absolute; - display: flex; - flex-direction: row; justify-content: center; align-items: center; top: 0; diff --git a/framework/components/menu_item.dart b/framework/components/menu_item.dart index 1539651c2..9f6ee033d 100644 --- a/framework/components/menu_item.dart +++ b/framework/components/menu_item.dart @@ -9,18 +9,12 @@ import 'ink_well.dart'; class MenuItem extends ButtonBase { static final Style _style = new Style(''' - transform: translateX(0); - display: flex; - flex-direction: row; align-items: center; height: 48px; -webkit-user-select: none;''' ); static final Style _highlightStyle = new Style(''' - transform: translateX(0); - display: flex; - flex-direction: row; align-items: center; height: 48px; background: rgba(153, 153, 153, 0.4); -- GitLab