Skip to content

Commit

Permalink
Merge pull request Tencent#18 from BearJ/master
Browse files Browse the repository at this point in the history
optimization & bug fix
  • Loading branch information
weui committed Oct 14, 2015
2 parents 67237bd + 15605c8 commit b4f27b0
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 20 deletions.
3 changes: 3 additions & 0 deletions dist/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ <h1 class="page_title">Cell</h1>
</div>
</div>
</div>
<div class="weui_btn_area">
<a class="weui_btn weui_btn_primary" href="javascript:">确定</a>
</div>
<div class="weui_cells_title">文本域</div>
<div class="weui_cells weui_cells_form">
<div class="weui_cell">
Expand Down
20 changes: 13 additions & 7 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.

11 changes: 6 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ var rename = require('gulp-rename');
var sourcemaps = require('gulp-sourcemaps');
var browserSync = require('browser-sync');

var option = {base: 'src'};
var dist = __dirname + '/dist';

gulp.task('styles', function () {
var option = {base: 'src'};

gulp.task('source', function(){
gulp.src('src/example/**/*.!(less)', option)
.pipe(gulp.dest(dist))
.pipe(browserSync.reload({stream: true}));
});

gulp.task('styles', ['source'], function () {
gulp.src('src/example/example.less', option)
.pipe(less().on('error', function (e){
console.error(e.message);
Expand Down Expand Up @@ -45,9 +46,9 @@ gulp.task('release', ['styles']);

gulp.task('watch', function () {
gulp.watch('src/**/*.less', ['styles']);
gulp.watch('src/example/**/*.{html,js}', function () {
gulp.watch('src/example/**/*.{html,js}', ['source'], function () {
browserSync.reload();
})
});
});

gulp.task('server', function () {
Expand Down
3 changes: 3 additions & 0 deletions src/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ <h1 class="page_title">Cell</h1>
</div>
</div>
</div>
<div class="weui_btn_area">
<a class="weui_btn weui_btn_primary" href="javascript:">确定</a>
</div>
<div class="weui_cells_title">文本域</div>
<div class="weui_cells weui_cells_form">
<div class="weui_cell">
Expand Down
4 changes: 3 additions & 1 deletion src/style/base/variable/weui_cell.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
@weuiCellBorderColor:#ECECEC;
@weuiCellGapV:10px;
@weuiCellGapH:15px;
@weuiCellInnerGapH:.35em;
@weuiCellInnerGapH:.35em;

@weuiCellsMarginTop:.8em;
14 changes: 10 additions & 4 deletions src/style/widget/weui_button/weui_button.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@ button, input {
}

.weui_btn.weui_btn_inline + .weui_btn.weui_btn_inline {
margin-top: auto;
margin-top: auto;
margin-left: @weuiBtnDefaultGap;
}

.weui_btn_area {
margin-left: 15px;
margin-right: 15px;
font-size: 0;
&.weui_btn_area_inline {
-webkit-display: flex;
display: flex;
Expand All @@ -57,10 +55,18 @@ button, input {
&:last-child {
margin-right: 0;
}
//hack for IE9
}

// hack for WinPhone7
letter-spacing: -1em ~"\9";
.weui_btn{
display: inline-block ~"\9";
width: 48.5% ~"\9";
margin-right: 1.5% ~"\9";
margin-right: 3% ~"\9";
letter-spacing: 0 ~"\9";
}
}
.weui_cells_form + & {
margin-top: @weuiCellsMarginTop;
}
}
4 changes: 2 additions & 2 deletions src/style/widget/weui_cell/weui_cell_global.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
}
.weui_cells {
margin-top: .8em;
margin-top: @weuiCellsMarginTop;
background-color: @weuiCellBg;
line-height: 1.45;
font-size: 16px; //cell中间有效高度23px,跟客户端默认图标尺寸一致
Expand All @@ -33,7 +33,7 @@
}

.weui_cells_title {
margin-top: .8em;
margin-top: @weuiCellsMarginTop;
padding-left: @weuiCellGapH;
padding-right: @weuiCellGapH;
color: @globalTextColor;
Expand Down

0 comments on commit b4f27b0

Please sign in to comment.