Skip to content

Commit

Permalink
standard weui select gap (#328)
Browse files Browse the repository at this point in the history
* standard weui select gap

* replace weui cell snapshot
  • Loading branch information
uxsi authored and progrape committed Apr 18, 2016
1 parent aeccf03 commit 14ee030
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion dist/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ <h1 class="page_title">Cell</h1>
</div>
<div class="weui_cell weui_cell_select weui_select_after">
<div class="weui_cell_hd">
国家/地区
<label for="" class="weui_label">国家/地区</label>
</div>
<div class="weui_cell_bd weui_cell_primary">
<select class="weui_select" name="select2">
Expand Down
Binary file modified dist/example/snapshot/cell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions dist/style/weui.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/style/weui.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/example/fragment/cell.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ <h1 class="page_title">Cell</h1>
</div>
<div class="weui_cell weui_cell_select weui_select_after">
<div class="weui_cell_hd">
国家/地区
<label for="" class="weui_label">国家/地区</label>
</div>
<div class="weui_cell_bd weui_cell_primary">
<select class="weui_select" name="select2">
Expand Down
Binary file modified src/example/snapshot/cell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/style/base/variable/weui_cell.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@weuiCellHeight: 44px;
@weuiCellFontSize:17px;
@weuiCellTipsFontSize:14px;
@weuiCellLabelWidth:105px;

@weuiCellLineHeight: unit((@weuiCellHeight - 2 * @weuiCellGapV) / @weuiCellFontSize); // 高度为44px,减去上下padding的行高
@weuiCellsMarginTop:unit(20 / @weuiCellFontSize, em);
5 changes: 1 addition & 4 deletions src/style/widget/weui_cell/weui_form/weui_form_common.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.weui_label{
display:block;
width:3em;
width:@weuiCellLabelWidth;
}
.weui_input {
width: 100%;
Expand Down Expand Up @@ -60,9 +60,6 @@
color:@globalWarnColor;
.weui_icon_warn{display:inline-block;}
}
.weui_cell_hd {
padding-right: .3em;
}
.weui_cell_ft{font-size:0;}
.weui_icon_warn{
display:none;
Expand Down
1 change: 1 addition & 0 deletions src/style/widget/weui_cell/weui_form/weui_select.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
width: 100%;
font-size: inherit;
height: @weuiCellHeight;
line-height: @weuiCellHeight;
position: relative;
z-index: 1;
padding-left: @weuiCellGapH;
Expand Down
3 changes: 3 additions & 0 deletions src/style/widget/weui_cell/weui_form/weui_select_after.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@

.weui_select_after {
padding-left:@weuiCellGapH;
.weui_select {
padding-left:0;
}
}
5 changes: 4 additions & 1 deletion src/style/widget/weui_cell/weui_form/weui_select_before.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

.weui_select_before {
padding-right:@weuiCellGapH;
.weui_select{width:auto;}
.weui_select {
width:@weuiCellLabelWidth;
box-sizing: border-box;
}
.weui_cell_hd {
position:relative;
&:after {
Expand Down

0 comments on commit 14ee030

Please sign in to comment.