Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix masses style #632

Merged
merged 1 commit into from
Oct 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/docs/zh-cn/badge.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<el-dropdown trigger="click">
<span class="el-dropdown-link">
点我查看<i class="el-icon-caret-bottom el-icon-right"></i>
点我查看<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item class="clearfix">
Expand Down
8 changes: 6 additions & 2 deletions examples/docs/zh-cn/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
.el-button + .el-button {
margin-left: 0;
}

& + .el-button-group {
margin-left: 10px;
}
}
}

Expand Down Expand Up @@ -131,7 +135,7 @@
<el-button type="primary" icon="share"></el-button>
<el-button type="primary" icon="delete"></el-button>
<el-button type="primary" icon="search">搜索</el-button>
<el-button type="primary">上传<i class="el-icon-upload el-icon-right"></i></el-button>
<el-button type="primary">上传<i class="el-icon-upload el-icon--right"></i></el-button>
```
:::

Expand All @@ -144,7 +148,7 @@
```html
<el-button-group>
<el-button type="primary" icon="arrow-left">上一页</el-button>
<el-button type="primary">下一页<i class="el-icon-arrow-right el-icon-right"></i></el-button>
<el-button type="primary">下一页<i class="el-icon-arrow-right el-icon--right"></i></el-button>
</el-button-group>
<el-button-group>
<el-button type="primary" icon="edit"></el-button>
Expand Down
8 changes: 4 additions & 4 deletions examples/docs/zh-cn/dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
```html
<el-dropdown>
<span class="el-dropdown-link">
下拉菜单<i class="el-icon-caret-bottom el-icon-right"></i>
下拉菜单<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>黄金糕</el-dropdown-item>
Expand All @@ -82,7 +82,7 @@
```html
<el-dropdown>
<el-button type="primary">
更多菜单<i class="el-icon-caret-bottom el-icon-right"></i>
更多菜单<i class="el-icon-caret-bottom el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>黄金糕</el-dropdown-item>
Expand Down Expand Up @@ -117,7 +117,7 @@
<span class="demonstration">hover 激活</span>
<el-dropdown>
<span class="el-dropdown-link">
下拉菜单<i class="el-icon-caret-bottom el-icon-right"></i>
下拉菜单<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>黄金糕</el-dropdown-item>
Expand All @@ -132,7 +132,7 @@
<span class="demonstration">click 激活</span>
<el-dropdown trigger="click">
<span class="el-dropdown-link">
下拉菜单<i class="el-icon-caret-bottom el-icon-right"></i>
下拉菜单<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>黄金糕</el-dropdown-item>
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/zh-cn/progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

```html
<el-progress :percentage="0"></el-progress>
<el-progress :percentage="70" :show-text="false"></el-progress>
<el-progress :percentage="70"></el-progress>
<el-progress :percentage="100" status="success"></el-progress>
<el-progress :percentage="50" status="exception"></el-progress>
```
Expand Down
9 changes: 3 additions & 6 deletions packages/button/src/button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<button :disabled="disabled" class="el-button"
:type="nativeType"
:class="[
type ? 'el-button-' + type : '',
size ? 'el-button-' + size : '',
type ? 'el-button--' + type : '',
size ? 'el-button--' + size : '',
{
'is-disabled': disabled,
'is-loading': loading,
Expand All @@ -13,13 +13,10 @@
>
<i class="el-icon-loading" v-if="loading"></i>
<i :class="'el-icon-' + icon" v-if="icon && !loading"></i>
<slot></slot>
<span v-if="$slots.default"><slot></slot></span>
</button>
</template>
<script>
/**
* button
*/
export default {
name: 'ElButton',

Expand Down
2 changes: 1 addition & 1 deletion packages/input-number/src/input-number.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="el-input-number"
:class="[
size ? 'is-' + size : '',
size ? 'el-input-number--' + size : '',
{ 'is-disabled': disabled }
]"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/input/src/input.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div :class="[
type === 'textarea' ? 'el-textarea' : 'el-input',
size ? 'el-input-' + size : '',
size ? 'el-input--' + size : '',
{
'is-disabled': disabled,
'el-input-group': $slots.prepend || $slots.append
Expand Down
6 changes: 3 additions & 3 deletions packages/message-box/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>
<div class="el-message-box__btns">
<el-button :class="[ cancelButtonClasses ]" v-show="showCancelButton" @click.native="handleAction('cancel')">{{ cancelButtonText }}</el-button>
<el-button :class="[ confirmButtonClasses ]" v-show="showConfirmButton" @click.native="handleAction('confirm')" type="primary">{{ confirmButtonText }}</el-button>
<el-button :class="[ confirmButtonClasses ]" v-show="showConfirmButton" @click.native="handleAction('confirm')">{{ confirmButtonText }}</el-button>
</div>
</div>
</transition>
Expand Down Expand Up @@ -71,10 +71,10 @@
},

confirmButtonClasses() {
return `el-button el-button-primary ${ this.confirmButtonClass }`;
return `el-button--primary ${ this.confirmButtonClass }`;
},
cancelButtonClasses() {
return `el-button el-button-default ${ this.cancelButtonClass }`;
return `${ this.cancelButtonClass }`;
}
},

Expand Down
2 changes: 1 addition & 1 deletion packages/radio/src/radio-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<label
class="el-radio-button"
:class="[
size ? 'el-radio-button-' + size : '',
size ? 'el-radio-button--' + size : '',
{ 'is-active': value === label }
]"
>
Expand Down
70 changes: 34 additions & 36 deletions packages/theme-default/src/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,44 +97,42 @@
background-color: rgba(255,255,255,.35);
}
}
}

@b button-primary {
@mixin button-variant var(--button-primary-color), var(--button-primary-fill), var(--button-primary-border);
}
@b button-success {
@mixin button-variant var(--button-success-color), var(--button-success-fill), var(--button-success-border);
}
@b button-warning {
@mixin button-variant var(--button-warning-color), var(--button-warning-fill), var(--button-warning-border);
}
@b button-danger {
@mixin button-variant var(--button-danger-color), var(--button-danger-fill), var(--button-danger-border);
}
@b button-info {
@mixin button-variant var(--button-info-color), var(--button-info-fill), var(--button-info-border);
}
@b button-text {
border: none;
color: var(--color-primary);
background: transparent;

&:hover {
color: tint(var(--color-primary), var(--button-hover-tint-percent));
@m primary {
@mixin button-variant var(--button-primary-color), var(--button-primary-fill), var(--button-primary-border);
}
&:active {
color: shade(var(--color-primary), var(--button-active-shade-percent));
@m success {
@mixin button-variant var(--button-success-color), var(--button-success-fill), var(--button-success-border);
}
}
@m warning {
@mixin button-variant var(--button-warning-color), var(--button-warning-fill), var(--button-warning-border);
}
@m danger {
@mixin button-variant var(--button-danger-color), var(--button-danger-fill), var(--button-danger-border);
}
@m info {
@mixin button-variant var(--button-info-color), var(--button-info-fill), var(--button-info-border);
}
@m text {
border: none;
color: var(--color-primary);
background: transparent;

@b button-large {
@mixin button-size var(--button-large-padding-vertical), var(--button-large-padding-horizontal), var(--button-large-font-size), var(--button-border-radius);
}
@b button-small {
@mixin button-size var(--button-small-padding-vertical), var(--button-small-padding-horizontal), var(--button-small-font-size), var(--button-border-radius);
}
@b button-mini {
@mixin button-size var(--button-mini-padding-vertical), var(--button-mini-padding-horizontal), var(--button-mini-font-size), var(--button-border-radius);
&:hover {
color: tint(var(--color-primary), var(--button-hover-tint-percent));
}
&:active {
color: shade(var(--color-primary), var(--button-active-shade-percent));
}
}
@m large {
@mixin button-size var(--button-large-padding-vertical), var(--button-large-padding-horizontal), var(--button-large-font-size), var(--button-border-radius);
}
@m small {
@mixin button-size var(--button-small-padding-vertical), var(--button-small-padding-horizontal), var(--button-small-font-size), var(--button-border-radius);
}
@m mini {
@mixin button-size var(--button-mini-padding-vertical), var(--button-mini-padding-horizontal), var(--button-mini-font-size), var(--button-border-radius);
}
}

@b button-group {
Expand Down Expand Up @@ -171,7 +169,7 @@
}

@each $type in (primary, success, warning, danger, info) {
.el-button-$type {
.el-button--$type {
&:first-child {
border-right-color: rgba(#fff, 0.5);
}
Expand Down
4 changes: 4 additions & 0 deletions packages/theme-default/src/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,9 @@
font-size: var(--checkbox-font-size);
padding-left: 5px;
}

& + .el-checkbox {
margin-left: 15px;
}
}
}
2 changes: 1 addition & 1 deletion packages/theme-default/src/dropdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
margin: 0 3px;
}
@m text {
.el-button-text {
.el-button--text {
padding: 0;
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/theme-default/src/icon.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@
animation: rotating 1s linear infinite;
}

.el-icon-right {
.el-icon--right {
margin-left: 5px;
}
.el-icon-left {
.el-icon--left {
margin-right: 5px;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/theme-default/src/input-number.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}
}
}
@when large {
@m large {
width: 200px;

& .el-input-number__increase, .el-input-number__decrease {
Expand All @@ -63,7 +63,7 @@
right: calc(var(--input-large-height) + 1px);
}
}
@when small {
@m small {
width: 130px;

& .el-input-number__increase, .el-input-number__decrease {
Expand Down
31 changes: 15 additions & 16 deletions packages/theme-default/src/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,27 +78,26 @@
.el-icon-loading {
animation: validating-rotating 1s linear infinite;
}
}

@b input-large {
font-size: var(--input-large-font-size);
@m large {
font-size: var(--input-large-font-size);

& .el-input__inner {
height: var(--input-large-height);
& .el-input__inner {
height: var(--input-large-height);
}
}
}
@b input-small {
font-size: var(--input-small-font-size);
@m small {
font-size: var(--input-small-font-size);

& .el-input__inner {
height: var(--input-small-height);
& .el-input__inner {
height: var(--input-small-height);
}
}
}
@b input-mini {
font-size: var(--input-mini-font-size);
@m mini {
font-size: var(--input-mini-font-size);

& .el-input__inner {
height: var(--input-mini-height);
& .el-input__inner {
height: var(--input-mini-height);
}
}
}

Expand Down
33 changes: 13 additions & 20 deletions packages/theme-default/src/radio.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@utils-user-select none;

& + .el-radio {
margin-left: 30px;
margin-left: 15px;
}

@e input {
Expand Down Expand Up @@ -143,13 +143,6 @@
color: var(--color-primary);
}

& .el-icon-right {
margin-left: 5px;
}
& .el-icon-left {
margin-right: 5px;
}

& [class*="el-icon-"] {
line-height: 0.9;

Expand Down Expand Up @@ -199,20 +192,20 @@
border-radius: 0 var(--border-radius-base) var(--border-radius-base) 0;
}
}
}
@b radio-button-large {
& .el-radio-button__inner {
@mixin button-size var(--button-large-padding-vertical), var(--button-large-padding-horizontal), var(--button-large-font-size), 0;
@m large {
& .el-radio-button__inner {
@mixin button-size var(--button-large-padding-vertical), var(--button-large-padding-horizontal), var(--button-large-font-size), 0;
}
}
}
@b radio-button-small {
& .el-radio-button__inner {
@mixin button-size var(--button-small-padding-vertical), var(--button-small-padding-horizontal), var(--button-small-font-size), 0;
@m small {
& .el-radio-button__inner {
@mixin button-size var(--button-small-padding-vertical), var(--button-small-padding-horizontal), var(--button-small-font-size), 0;
}
}
}
@b radio-button-mini {
& .el-radio-button__inner {
@mixin button-size var(--button-mini-padding-vertical), var(--button-mini-padding-horizontal), var(--button-mini-font-size), 0;
@m mini {
& .el-radio-button__inner {
@mixin button-size var(--button-mini-padding-vertical), var(--button-mini-padding-horizontal), var(--button-mini-font-size), 0;
}
}
}
}
Loading