Skip to content

Commit

Permalink
[Improvement] Cell: update to flex-box (youzan#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Mar 23, 2018
1 parent 0030024 commit eda842c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/cell/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</slot>
<slot name="title">
<span class="van-cell__text" v-text="title" />
<span class="van-cell__label" v-if="label" v-text="label" />
<div class="van-cell__label" v-if="label" v-text="label" />
</slot>
</div>
<div
Expand Down
7 changes: 2 additions & 5 deletions packages/vant-css/src/cell.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.van-cell {
width: 100%;
display: table;
display: flex;
padding: 10px 15px;
box-sizing: border-box;
line-height: 24px;
Expand All @@ -25,8 +25,6 @@
}

&__title {
display: table-cell;

.van-icon {
font-size: 16px;
margin-right: 5px;
Expand All @@ -39,14 +37,13 @@
}

&__label {
display: block;
font-size: 12px;
line-height: 1.2;
color: $gray-darker;
}

&__value {
display: table-cell;
flex: 1;
text-align: right;
vertical-align: middle;
overflow: hidden;
Expand Down

0 comments on commit eda842c

Please sign in to comment.