提交 636d169c 编写于 作者: H Hixie

[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
上级 878336e8
...@@ -8,11 +8,7 @@ import 'material.dart'; ...@@ -8,11 +8,7 @@ import 'material.dart';
class Button extends Component { class Button extends Component {
static final Style _style = new Style(''' static final Style _style = new Style('''
display: inline-flex;
transform: translateX(0);
-webkit-user-select: none; -webkit-user-select: none;
justify-content: center;
align-items: center;
height: 36px; height: 36px;
min-width: 64px; min-width: 64px;
padding: 0 8px; padding: 0 8px;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
import '../fn.dart'; import '../fn.dart';
import '../layout.dart';
import 'button_base.dart'; import 'button_base.dart';
import 'dart:sky' as sky; import 'dart:sky' as sky;
...@@ -11,8 +12,6 @@ typedef void ValueChanged(value); ...@@ -11,8 +12,6 @@ typedef void ValueChanged(value);
class Checkbox extends ButtonBase { class Checkbox extends ButtonBase {
static final Style _style = new Style(''' static final Style _style = new Style('''
transform: translateX(0); transform: translateX(0);
display: flex;
flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
-webkit-user-select: none; -webkit-user-select: none;
...@@ -68,8 +67,9 @@ class Checkbox extends ButtonBase { ...@@ -68,8 +67,9 @@ class Checkbox extends ButtonBase {
UINode buildContent() { UINode buildContent() {
return new EventListenerNode( return new EventListenerNode(
new Container( new FlexContainer(
style: _style, style: _style,
direction: FlexDirection.Row,
children: [ children: [
new Container( new Container(
style: highlight ? _containerHighlightStyle : _containerStyle, style: highlight ? _containerHighlightStyle : _containerStyle,
......
...@@ -11,17 +11,13 @@ class FloatingActionButton extends Component { ...@@ -11,17 +11,13 @@ class FloatingActionButton extends Component {
// TODO(abarth): We need a better way to become a container for absolutely // TODO(abarth): We need a better way to become a container for absolutely
// positioned elements. // positioned elements.
static final Style _style = new Style(''' static final Style _style = new Style('''
transform: translateX(0);
width: 56px; width: 56px;
height: 56px; height: 56px;
background-color: ${Red[500]}; background-color: ${Red[500]};
border-radius: 28px;''' border-radius: 28px;'''
); );
static final Style _clipStyle = new Style(''' static final Style _clipStyle = new Style('''
transform: translateX(0);
position: absolute; position: absolute;
display: flex;
flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
top: 0; top: 0;
......
...@@ -9,18 +9,12 @@ import 'ink_well.dart'; ...@@ -9,18 +9,12 @@ import 'ink_well.dart';
class MenuItem extends ButtonBase { class MenuItem extends ButtonBase {
static final Style _style = new Style(''' static final Style _style = new Style('''
transform: translateX(0);
display: flex;
flex-direction: row;
align-items: center; align-items: center;
height: 48px; height: 48px;
-webkit-user-select: none;''' -webkit-user-select: none;'''
); );
static final Style _highlightStyle = new Style(''' static final Style _highlightStyle = new Style('''
transform: translateX(0);
display: flex;
flex-direction: row;
align-items: center; align-items: center;
height: 48px; height: 48px;
background: rgba(153, 153, 153, 0.4); background: rgba(153, 153, 153, 0.4);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册