Commit b27cec9b authored by baiyaaaaa's avatar baiyaaaaa Committed by GitHub

Merge pull request #752 from Leopoldthecoder/master

Theme-default: add variables
parents 6aa46cac 0eb6b5b3
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
适用性较广的基础多选,用 Tag 展示已选项 适用性较广的基础多选,用 Tag 展示已选项
:::demo 为`el-select`设置`nultiple`属性即可启用多选,此时`v-model`的值为当前选中值所组成的数组 :::demo 为`el-select`设置`multiple`属性即可启用多选,此时`v-model`的值为当前选中值所组成的数组
```html ```html
<template> <template>
<el-select v-model="value5" multiple> <el-select v-model="value5" multiple>
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
@b alert { @b alert {
width: 100%; width: 100%;
padding: 8px 16px; padding: var(--alert-padding);
margin: 0; margin: 0;
box-sizing: border-box; box-sizing: border-box;
border-radius: 4px; border-radius: var(--alert-border-radius);
position: relative; position: relative;
background-color: #fff; background-color: var(--color-white);
overflow: hidden; overflow: hidden;
color: #fff; color: #fff;
opacity: 1; opacity: 1;
...@@ -18,19 +18,19 @@ ...@@ -18,19 +18,19 @@
transition: opacity .2s; transition: opacity .2s;
@modifier success { @modifier success {
background-color: var(--color-success); background-color: var(--alert-success-color);
} }
@modifier info { @modifier info {
background-color: var(--color-info); background-color: var(--alert-info-color);
} }
@modifier warning { @modifier warning {
background-color: var(--color-warning); background-color: var(--alert-warning-color);
} }
@modifier error { @modifier error {
background-color: var(--color-danger); background-color: var(--alert-danger-color);
} }
@e content { @e content {
...@@ -39,19 +39,19 @@ ...@@ -39,19 +39,19 @@
} }
@e icon { @e icon {
font-size: 16px; font-size: var(--alert-icon-size);
width: 16px; width: var(--alert-icon-size);
display: table-cell; display: table-cell;
color: #fff; color: var(--color-white);
vertical-align: middle; vertical-align: middle;
@when big { @when big {
font-size: 28px; font-size: var(--alert-icon-large-size);
width: 28px; width: var(--alert-icon-large-size);
} }
} }
@e title { @e title {
font-size: 13px; font-size: var(--alert-title-font-size);
line-height: 18px; line-height: 18px;
@when bold { @when bold {
font-weight: bold; font-weight: bold;
...@@ -60,12 +60,12 @@ ...@@ -60,12 +60,12 @@
& .el-alert__description { & .el-alert__description {
color: #fff; color: #fff;
font-size: 12px; font-size: var(--alert-description-font-size-font-size);
margin: 5px 0 0 0; margin: 5px 0 0 0;
} }
@e closebtn { @e closebtn {
font-size: 12px; font-size: var(--alert-close-font-size);
color: #fff; color: #fff;
opacity: 1; opacity: 1;
position: absolute 12px 15px * *; position: absolute 12px 15px * *;
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
@when customed { @when customed {
font-style: normal; font-style: normal;
font-size: 13px; font-size: var(--alert-close-customed-font-size);
top: 9px; top: 9px;
} }
} }
......
This diff is collapsed.
...@@ -9,20 +9,20 @@ ...@@ -9,20 +9,20 @@
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
background: #fff; background: #fff;
border-radius: 2px; border-radius: var(--border-radius-small);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); box-shadow: var(--dialog-box-shadow);
box-sizing: border-box; box-sizing: border-box;
@modifier tiny { @modifier tiny {
width: 30%; width: var(--dialog-tiny-width);
} }
@modifier small { @modifier small {
width: 50%; width: var(--dialog-small-width);
} }
@modifier large { @modifier large {
width: 90%; width: var(--dialog-large-width);
} }
@modifier full { @modifier full {
...@@ -44,16 +44,16 @@ ...@@ -44,16 +44,16 @@
@e close { @e close {
cursor: pointer; cursor: pointer;
color: #C0CCDA; color: var(--dialog-close-color);
&:hover { &:hover {
color: var(--color-primary); color: var(--dialog-close-hover-color);
} }
} }
@e title { @e title {
line-height: 1; line-height: 1;
font-size: 16px; font-size: var(--dialog-title-font-size);
font-weight: bold; font-weight: bold;
color: #1f2d3d; color: #1f2d3d;
} }
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
@e body { @e body {
padding: 30px 20px; padding: 30px 20px;
color: #475669; color: #475669;
font-size: 14px; font-size: var(--dialog-font-size);
} }
@e headerbtn { @e headerbtn {
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
left: 50%; left: 50%;
transform: translate3d(-50%, -50%, 0); transform: translate3d(-50%, -50%, 0);
background-color: #fff; background-color: #fff;
width: 420px; width: var(--msgbox-width);
border-radius: 3px; border-radius: var(--msgbox-border-radius);
font-size: 16px; font-size: var(--msgbox-font-size);
-webkit-user-select: none; -webkit-user-select: none;
overflow: hidden; overflow: hidden;
backface-visibility: hidden; backface-visibility: hidden;
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
@e content { @e content {
padding: 30px 20px; padding: 30px 20px;
color: #475669; color: var(--msgbox-content-color);
font-size: 14px; font-size: var(--msgbox-content-font-size);
position: relative; position: relative;
} }
...@@ -48,16 +48,16 @@ ...@@ -48,16 +48,16 @@
@e input { @e input {
padding-top: 15px; padding-top: 15px;
& input.invalid { & input.invalid {
border-color: #ff4949; border-color: var(--color-danger);
&:focus { &:focus {
border-color: #ff4949; border-color: var(--color-danger);
} }
} }
} }
@e errormsg { @e errormsg {
color: red; color: var(--color-danger);
font-size: 12px; font-size: var(--msgbox-error-font-size);
min-height: 18px; min-height: 18px;
margin-top: 2px; margin-top: 2px;
} }
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
@e title { @e title {
padding-left: 0; padding-left: 0;
margin-bottom: 0; margin-bottom: 0;
font-size: 16px; font-size: var(--msgbox-font-size);
font-weight: bold; font-weight: bold;
height: 18px; height: 18px;
color: #333; color: #333;
...@@ -100,19 +100,19 @@ ...@@ -100,19 +100,19 @@
font-size: 36px !important; font-size: 36px !important;
&.el-icon-circle-check { &.el-icon-circle-check {
color: #13ce66; color: var(--msgbox-success-color);
} }
&.el-icon-information { &.el-icon-information {
color: #50bfff; color: var(--msgbox-info-color);
} }
&.el-icon-warning { &.el-icon-warning {
color: #f7ba2a; color: var(--msgbox-warning-color);
} }
&.el-icon-circle-cross { &.el-icon-circle-cross {
color: #ff4949; color: var(--msgbox-error-color);
} }
} }
} }
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
@component-namespace el { @component-namespace el {
@b message { @b message {
box-shadow:0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04); box-shadow: var(--message-shadow);
min-width: 300px; min-width: var(--message-min-width);
padding: 10px 12px; padding: var(--message-padding);
box-sizing: border-box; box-sizing: border-box;
border-radius: 2px; border-radius: var(--border-radius-small);
position: fixed; position: fixed;
left: 50%; left: 50%;
top: 20px; top: 20px;
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
position: relative; position: relative;
& p { & p {
font-size: 14px; font-size: var(--font-size-base);
line-height: 20px; line-height: 20px;
margin: 0 34px 0 0; margin: 0 34px 0 0;
white-space: nowrap; white-space: nowrap;
color: #8492a6; color: var(--message-content-color);
text-align: justify; text-align: justify;
} }
} }
...@@ -42,28 +42,28 @@ ...@@ -42,28 +42,28 @@
@e closeBtn { @e closeBtn {
position: absolute 3px 0 * *; position: absolute 3px 0 * *;
cursor: pointer; cursor: pointer;
color: #C0CCDA; color: var(--message-close-color);
font-size: 14px; font-size: var(--font-size-base);
&:hover { &:hover {
color: #99A9BF; color: var(--message-close-hover-color);
} }
} }
& .el-icon-circle-check { & .el-icon-circle-check {
color: #13ce66; color: var(--message-success-color);
} }
& .el-icon-circle-cross { & .el-icon-circle-cross {
color: #ff4949; color: var(--message-danger-color);
} }
& .el-icon-information { & .el-icon-information {
color: #50bfff; color: var(--message-info-color);
} }
& .el-icon-warning { & .el-icon-warning {
color: #f7ba2a; color: var(--message-warning-color);
} }
} }
......
...@@ -4,36 +4,36 @@ ...@@ -4,36 +4,36 @@
@component-namespace el { @component-namespace el {
@b notification { @b notification {
width: 330px; width: var(--notification-width);
padding: 20px; padding: var(--notification-padding);
box-sizing: border-box; box-sizing: border-box;
border-radius: 2px; border-radius: var(--border-radius-small);
position: fixed; position: fixed;
right: 16px; right: 16px;
background-color: #fff; background-color: #fff;
box-shadow: 0 0 6px rgba(0, 0, 0, .04), 0 2px 4px rgba(0, 0, 0, .12); box-shadow: var(--notification-shadow);
transition: opacity 0.3s, transform .3s, right .3s, top 0.4s; transition: opacity 0.3s, transform .3s, right .3s, top 0.4s;
overflow: hidden; overflow: hidden;
z-index: var(--index-popper); z-index: var(--index-popper);
@e group { @e group {
& span { & span {
font-size: 16px; font-size: var(--notification-title-font-size);
color: #1f2d3d; color: var(--notification-title-color);
} }
& p { & p {
font-size: 14px; font-size: var(--notification-font-size);
line-height: 21px; line-height: 21px;
margin: 10px 0 0 0; margin: 10px 0 0 0;
color: #8492a6; color: var(--notification-color);
text-align: justify; text-align: justify;
} }
} }
@e icon { @e icon {
size: 40px; size: var(--notification-icon-size);
font-size: 40px; font-size: var(--notification-icon-size);
float: left; float: left;
position: relative; position: relative;
top: 3px; top: 3px;
...@@ -42,28 +42,28 @@ ...@@ -42,28 +42,28 @@
@e closeBtn { @e closeBtn {
position: absolute 20px 20px * *; position: absolute 20px 20px * *;
cursor: pointer; cursor: pointer;
color: #C0CCDA; color: var(--notification-close-color);
font-size: 14px; font-size: var(--notification-font-size);
&:hover { &:hover {
color: #99A9BF; color: var(--notification-close-hover-color);
} }
} }
& .el-icon-circle-check { & .el-icon-circle-check {
color: #13ce66; color: var(--notification-success-color);
} }
& .el-icon-circle-cross { & .el-icon-circle-cross {
color: #ff4949; color: var(--notification-danger-color);
} }
& .el-icon-information { & .el-icon-information {
color: #50bfff; color: var(--notification-info-color);
} }
& .el-icon-warning { & .el-icon-warning {
color: #f7ba2a; color: var(--notification-warning-color);
} }
} }
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
@e title { @e title {
padding-left: 10px; padding-left: 10px;
font-size: 12px; font-size: var(--select-group-font-size);
color: #999; color: var(--select-group-color);
height: 30px; height: var(--select-group-height);
line-height: 30px; line-height: var(--select-group-height);
} }
& .el-select-dropdown__item { & .el-select-dropdown__item {
......
...@@ -5,37 +5,37 @@ ...@@ -5,37 +5,37 @@
@b select-dropdown { @b select-dropdown {
@e item { @e item {
font-size: 14px; font-size: var(--select-font-size);
padding: 8px 10px; padding: 8px 10px;
position: relative; position: relative;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
color: #475669; color: var(--select-option-color);
height: 36px; height: var(--select-option-height);
line-height: 1.5; line-height: 1.5;
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
@when disabled { @when disabled {
color: #c0ccda; color: var(--select-option-disabled-color);
cursor: not-allowed; cursor: not-allowed;
&:hover { &:hover {
background-color: #fff; background-color: var(--color-white);
} }
} }
&.hover { &.hover {
background-color: #e5e9f2; background-color: var(--select-option-hover-background);
} }
&.selected { &.selected {
color: #fff; color: var(--color-white);
background-color: #20A0FF; background-color: var(--select-option-selected);
&.hover { &.hover {
background-color: #1D8CE0; background-color: var(--select-option-selected-hover);
} }
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
@component-namespace el { @component-namespace el {
@b rate { @b rate {
height: 20px; height: var(--rate-height);
@e item { @e item {
display: inline-block; display: inline-block;
position: relative; position: relative;
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
@e icon { @e icon {
position: relative; position: relative;
display: inline-block; display: inline-block;
font-size: 18px; font-size: var(--rate-icon-size);
margin-right: 6px; margin-right: var(--rate-icon-margin);
color: #C6D1DE; color: var(--rate-icon-color);
transition: .3s; transition: .3s;
&.hover { &.hover {
transform: scale(1.15); transform: scale(1.15);
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
} }
@e text { @e text {
font-size: 14px; font-size: var(--rate-font-size);
vertical-align: middle; vertical-align: middle;
} }
} }
......
...@@ -6,20 +6,20 @@ ...@@ -6,20 +6,20 @@
@b select-dropdown { @b select-dropdown {
position: absolute; position: absolute;
z-index: 1001; z-index: 1001;
border: solid 1px #d3dce6; border: var(--select-dropdown-border);
border-radius: 2px; border-radius: var(--border-radius-small);
background-color: #fff; background-color: var(--select-dropdown-background);
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04); box-shadow: var(--select-dropdown-shadow);
box-sizing: border-box; box-sizing: border-box;
margin: 5px 0; margin: 5px 0;
@when multiple { @when multiple {
& .el-select-dropdown__item.selected { & .el-select-dropdown__item.selected {
color: #20A0FF; color: var(--select-option-selected);
background-color: #fff; background-color: var(--select-dropdown-background);
&.hover { &.hover {
background-color: #E5E9F2; background-color: var(--select-option-hover-background);
} }
&::after { &::after {
...@@ -36,19 +36,19 @@ ...@@ -36,19 +36,19 @@
} }
@b select-dropdown__empty { @b select-dropdown__empty {
padding: 10px 0; padding: var(--select-dropdown-empty-padding);
margin: 0; margin: 0;
text-align: center; text-align: center;
color: #999; color: var(--select-dropdown-empty-color);
font-size: 14px; font-size: var(--select-font-size);
} }
@b select-dropdown__list { @b select-dropdown__list {
list-style: none; list-style: none;
padding: 6px 0; padding: var(--select-dropdown-padding);
margin: 0; margin: 0;
width: 100%; width: 100%;
max-height: 274px; max-height: var(--select-dropdown-max-height);
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;
} }
......
...@@ -14,21 +14,21 @@ ...@@ -14,21 +14,21 @@
@when small { @when small {
& input { & input {
border-radius: 2px; border-radius: var(--border-radius-small);
height: 28px; height: 28px;
} }
} }
&:hover { &:hover {
.el-input__inner { .el-input__inner {
border-color: #8492a6; border-color: var(--select-border-color-hover);
} }
} }
& .el-input { & .el-input {
& .el-input__icon { & .el-input__icon {
color: #c0ccda; color: var(--select-input-color);
font-size: 12px; font-size: var(--select-input-font-size);
transition: transform .3s; transition: transform .3s;
transform: translateY(-50%) rotateZ(180deg); transform: translateY(-50%) rotateZ(180deg);
line-height: 16px; line-height: 16px;
...@@ -42,15 +42,15 @@ ...@@ -42,15 +42,15 @@
@when show-close { @when show-close {
transition: 0s; transition: 0s;
size: 16px; size: 16px;
font-size: 14px; font-size: var(--select-font-size);
right: 8px; right: 8px;
text-align: center; text-align: center;
transform: translateY(-50%) rotateZ(180deg); transform: translateY(-50%) rotateZ(180deg);
border-radius: 50%; border-radius: var(--border-radius-circle);
color: #C0CCDA; color: var(--select-input-color);
&:hover { &:hover {
color: #99A9BF; color: var(--select-close-hover-color);
} }
} }
} }
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
cursor: pointer; cursor: pointer;
&:focus { &:focus {
border-color: #2ea0ff; border-color: var(--select-input-focus-background);
} }
} }
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
cursor: not-allowed; cursor: not-allowed;
&:hover { &:hover {
border-color: #D3DCE6; border-color: var(--select-disabled-border);
} }
} }
} }
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
outline: none; outline: none;
padding: 0; padding: 0;
margin: 4px 0 -3px 10px; margin: 4px 0 -3px 10px;
color: #666; color: var(--select-multiple-input-color);
font-size: 14px; font-size: var(--select-font-size);
vertical-align: baseline; vertical-align: baseline;
appearance: none; appearance: none;
height: 28px; height: 28px;
...@@ -93,12 +93,12 @@ ...@@ -93,12 +93,12 @@
top: 8px; top: 8px;
z-index: var(--index-top); z-index: var(--index-top);
right: 25px; right: 25px;
color: #c0ccda; color: var(--select-input-color);
line-height: 18px; line-height: 18px;
font-size: 12px; font-size: var(--select-input-font-size);
&:hover { &:hover {
color: #99A9BF; color: var(--select-close-hover-color);
} }
} }
...@@ -114,23 +114,23 @@ ...@@ -114,23 +114,23 @@
} }
& .el-tag { & .el-tag {
height: 24px; height: var(--select-tag-height);
line-height: 24px; line-height: var(--select-tag-height);
box-sizing: border-box; box-sizing: border-box;
margin: 6px 0 0 6px; margin: 6px 0 0 6px;
} }
@e tag { @e tag {
display: inline-block; display: inline-block;
height: 24px; height: var(--select-tag-height);
line-height: 24px; line-height: var(--select-tag-height);
font-size: 14px; font-size: var(--select-font-size);
border-radius: 4px; border-radius: var(--border-radius-base);
color: #fff; color: var(--select-tag-color);
background-color: #20a0ff; background-color: var(--select-tag-background);
& .el-icon-close { & .el-icon-close {
font-size: 12px; font-size: var(--select-input-font-size);
} }
} }
} }
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
@utils-clearfix; @utils-clearfix;
@e runway { @e runway {
width: 100%; width: 100%;
height: 4px; height: var(--slider-height);
margin: 20px 0; margin: var(--slider-margin);
background-color: var(--slider-runway-background-color); background-color: var(--slider-runway-background-color);
border-radius: 3px; border-radius: var(--slider-border-radius);
position: relative; position: relative;
cursor: pointer; cursor: pointer;
vertical-align: middle; vertical-align: middle;
...@@ -64,18 +64,18 @@ ...@@ -64,18 +64,18 @@
} }
@e bar { @e bar {
height: 4px; height: var(--slider-height);
background-color: var(--slider-main-background-color); background-color: var(--slider-main-background-color);
border-top-left-radius: 3px; border-top-left-radius: var(--slider-border-radius);
border-bottom-left-radius: 3px; border-bottom-left-radius: var(--slider-border-radius);
position: absolute; position: absolute;
} }
@e button-wrapper { @e button-wrapper {
size: 36px; size: var(--slider-button-wrapper-size);
position: absolute; position: absolute;
z-index: 1001; z-index: 1001;
top: -16px; top: var(--slider-button-wrapper-offset);
transform: translateX(-50%); transform: translateX(-50%);
background-color: transparent; background-color: transparent;
text-align: center; text-align: center;
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
} }
@e button { @e button {
size: 12px; size: var(--slider-button-size);
background-color: var(--slider-main-background-color); background-color: var(--slider-main-background-color);
border-radius: 50%; border-radius: 50%;
transition: .2s; transition: .2s;
...@@ -119,8 +119,8 @@ ...@@ -119,8 +119,8 @@
@e stop { @e stop {
position: absolute; position: absolute;
size: 4px; size: var(--slider-height);
border-radius: 50%; border-radius: var(--border-radius-circle);
background-color: var(--slider-stop-background-color); background-color: var(--slider-stop-background-color);
transform: translateX(-50%); transform: translateX(-50%);
} }
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
@b switch { @b switch {
display: inline-block; display: inline-block;
position: relative; position: relative;
line-height: 20px; font-size: var(--switch-font-size);
font-size: 14px;
@when disabled { @when disabled {
& .el-switch__core, & .el-switch__core,
& .el-switch__label { & .el-switch__label {
...@@ -19,11 +18,11 @@ ...@@ -19,11 +18,11 @@
transition: .2s; transition: .2s;
position: absolute; position: absolute;
z-index: 10; z-index: 10;
size: 46px 22px; size: var(--switch-size);
left: 0; left: 0;
top: 0; top: 0;
display: inline-block; display: inline-block;
font-size: 14px; font-size: var(--switch-font-size);
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
@m left { @m left {
...@@ -40,7 +39,7 @@ ...@@ -40,7 +39,7 @@
line-height: 1; line-height: 1;
top: 4px; top: 4px;
position: absolute; position: absolute;
font-size: 14px; font-size: var(--switch-font-size);
display: inline-block; display: inline-block;
color: var(--color-white); color: var(--color-white);
} }
...@@ -58,10 +57,10 @@ ...@@ -58,10 +57,10 @@
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
position: relative; position: relative;
size: 46px 22px; size: var(--switch-size);
border: 1px solid var(--switch-off-color); border: 1px solid var(--switch-off-color);
outline: none; outline: none;
border-radius: 12px; border-radius: var(--switch-core-border-radius);
box-sizing: border-box; box-sizing: border-box;
background: var(--switch-off-color); background: var(--switch-off-color);
cursor: pointer; cursor: pointer;
...@@ -69,9 +68,9 @@ ...@@ -69,9 +68,9 @@
& .el-switch__button { & .el-switch__button {
position: absolute 0 * * 0; position: absolute 0 * * 0;
border-radius: 15px; border-radius: var(--border-radius-circle);
transition: transform .3s; transition: transform .3s;
size: 16px; size: var(--switch-button-size);
z-index: 20; z-index: 20;
background-color: var(--color-white); background-color: var(--color-white);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment