2019-01-28 16:09:11 +08:00
|
|
|
.make-palette(@color, @index: 1) when (@index <= 10) {
|
|
|
|
.palette-@{color}-@{index} {
|
|
|
|
@background: '@{color}-@{index}';
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2019-01-28 16:09:11 +08:00
|
|
|
background: @@background;
|
|
|
|
}
|
|
|
|
.make-palette(@color, (@index + 1)); // next iteration
|
|
|
|
}
|
|
|
|
|
2019-03-19 16:36:37 +08:00
|
|
|
@gray-1: #fff;
|
|
|
|
@gray-2: #fafafa;
|
|
|
|
@gray-3: #f5f5f5;
|
|
|
|
@gray-4: #e8e8e8;
|
|
|
|
@gray-5: #d9d9d9;
|
|
|
|
@gray-6: #bfbfbf;
|
|
|
|
@gray-7: #8c8c8c;
|
|
|
|
@gray-8: #595959;
|
|
|
|
@gray-9: #262626;
|
|
|
|
@gray-10: #000;
|
2019-01-28 16:09:11 +08:00
|
|
|
@border-color: rgba(229, 231, 235, 100);
|
|
|
|
|
2017-10-13 20:27:22 +08:00
|
|
|
.color-palettes {
|
|
|
|
margin: 0 1%;
|
|
|
|
}
|
2016-03-03 17:23:08 +08:00
|
|
|
.color-palette {
|
2017-10-13 20:27:22 +08:00
|
|
|
display: inline-block;
|
2019-02-15 10:48:07 +08:00
|
|
|
width: 31%;
|
|
|
|
margin: 45px 1%;
|
2017-03-17 20:14:11 +08:00
|
|
|
&-pick {
|
2018-04-27 22:09:49 +08:00
|
|
|
margin: 0 0 20px;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-size: 20px;
|
|
|
|
text-align: center;
|
2017-03-17 20:14:11 +08:00
|
|
|
}
|
|
|
|
&-picker {
|
2018-04-27 22:09:49 +08:00
|
|
|
margin: 24px 0;
|
2017-03-17 20:14:11 +08:00
|
|
|
&-value {
|
2018-04-27 22:09:49 +08:00
|
|
|
position: relative;
|
|
|
|
top: -3px;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-left: 16px;
|
|
|
|
font-size: 14px;
|
|
|
|
font-family: Consolas, sans-serif;
|
2018-04-27 22:09:49 +08:00
|
|
|
}
|
|
|
|
&-validation {
|
|
|
|
position: relative;
|
|
|
|
top: -3px;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-left: 16px;
|
|
|
|
color: @error-color;
|
|
|
|
font-size: 13px;
|
2017-03-17 20:14:11 +08:00
|
|
|
}
|
|
|
|
}
|
2016-03-03 17:23:08 +08:00
|
|
|
}
|
2016-05-11 00:24:00 +08:00
|
|
|
|
2016-03-03 17:23:08 +08:00
|
|
|
.main-color {
|
2019-01-28 16:09:11 +08:00
|
|
|
.make-palette(blue);
|
|
|
|
.make-palette(purple);
|
|
|
|
.make-palette(cyan);
|
|
|
|
.make-palette(green);
|
|
|
|
.make-palette(magenta);
|
|
|
|
.make-palette(red);
|
|
|
|
.make-palette(volcano);
|
|
|
|
.make-palette(orange);
|
|
|
|
.make-palette(gold);
|
|
|
|
.make-palette(yellow);
|
|
|
|
.make-palette(lime);
|
|
|
|
.make-palette(geekblue);
|
2019-03-19 16:36:37 +08:00
|
|
|
.make-palette(gray);
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2017-12-08 14:43:56 +08:00
|
|
|
text-align: left;
|
2019-01-28 16:09:11 +08:00
|
|
|
|
2017-01-04 15:13:55 +08:00
|
|
|
&-item {
|
2019-02-15 10:48:07 +08:00
|
|
|
position: relative;
|
2017-10-13 20:27:22 +08:00
|
|
|
height: 44px;
|
2017-01-20 13:41:13 +08:00
|
|
|
margin-right: 4px;
|
2019-02-15 10:48:07 +08:00
|
|
|
padding: 0 12px;
|
2017-10-13 20:27:22 +08:00
|
|
|
font-size: 14px;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-family: Consolas, sans-serif;
|
|
|
|
line-height: 44px;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: all 0.2s;
|
2017-10-13 20:27:22 +08:00
|
|
|
&:first-child {
|
|
|
|
border-radius: 4px 4px 0 0;
|
|
|
|
}
|
2017-01-20 13:41:13 +08:00
|
|
|
&:last-child {
|
2017-10-13 20:27:22 +08:00
|
|
|
border-radius: 0 0 4px 4px;
|
2017-01-20 13:41:13 +08:00
|
|
|
}
|
2017-03-10 18:04:14 +08:00
|
|
|
&:hover {
|
2017-10-13 20:27:22 +08:00
|
|
|
margin-right: -8px;
|
|
|
|
border-radius: 0 4px 4px 0;
|
2017-03-10 18:04:14 +08:00
|
|
|
}
|
2017-01-04 15:13:55 +08:00
|
|
|
}
|
2017-10-09 18:24:12 +08:00
|
|
|
&-item &-text {
|
2017-10-13 20:27:22 +08:00
|
|
|
float: left;
|
2019-02-15 10:48:07 +08:00
|
|
|
transition: all 0.3s;
|
2017-10-09 18:24:12 +08:00
|
|
|
}
|
2017-01-04 15:13:55 +08:00
|
|
|
&-item &-value {
|
2019-02-15 10:48:07 +08:00
|
|
|
position: relative;
|
|
|
|
left: 3px;
|
2017-10-13 20:27:22 +08:00
|
|
|
float: right;
|
2017-01-01 22:20:06 +08:00
|
|
|
transform: scale(0.85);
|
2017-10-19 17:02:02 +08:00
|
|
|
transform-origin: 100% 50%;
|
2017-01-01 22:20:06 +08:00
|
|
|
opacity: 0;
|
2018-12-07 16:17:45 +08:00
|
|
|
transition: all 0.3s;
|
2017-01-01 22:20:06 +08:00
|
|
|
}
|
2016-03-03 17:23:08 +08:00
|
|
|
}
|
|
|
|
|
2017-01-01 22:20:06 +08:00
|
|
|
.color-title {
|
2017-03-03 13:48:22 +08:00
|
|
|
margin: 0 0 24px;
|
2017-02-26 15:41:50 +08:00
|
|
|
color: #5c6b77;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-weight: 500;
|
2017-10-13 20:27:22 +08:00
|
|
|
font-size: 22px;
|
2017-03-03 13:48:22 +08:00
|
|
|
text-align: center;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-transform: capitalize;
|
2016-03-03 17:23:08 +08:00
|
|
|
}
|
|
|
|
|
2017-01-01 22:20:06 +08:00
|
|
|
.color-description {
|
2017-03-03 13:48:22 +08:00
|
|
|
display: block;
|
2019-02-15 10:48:07 +08:00
|
|
|
color: #777;
|
|
|
|
font-weight: lighter;
|
|
|
|
font-size: 14px;
|
2016-03-03 17:23:08 +08:00
|
|
|
}
|
|
|
|
|
2017-01-01 22:20:06 +08:00
|
|
|
.main-color:hover {
|
2017-01-04 15:13:55 +08:00
|
|
|
.main-color-value {
|
2017-10-13 20:27:22 +08:00
|
|
|
left: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
opacity: 0.7;
|
2017-01-01 22:20:06 +08:00
|
|
|
}
|
2016-03-03 17:23:08 +08:00
|
|
|
}
|
|
|
|
|
2017-12-26 14:57:49 +08:00
|
|
|
.color-palette-horizontal {
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
.main-color {
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
&-item {
|
|
|
|
position: relative;
|
2019-02-15 10:48:07 +08:00
|
|
|
flex: 1;
|
2017-12-26 14:57:49 +08:00
|
|
|
height: 86px;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-right: 0;
|
2018-12-26 23:44:36 +08:00
|
|
|
padding: 37px 0 0;
|
2017-12-26 14:57:49 +08:00
|
|
|
line-height: normal;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-align: center;
|
|
|
|
border-radius: 0;
|
2017-12-26 14:57:49 +08:00
|
|
|
|
|
|
|
.main-color-text {
|
|
|
|
float: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
height: 96px;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-top: -10px;
|
2017-12-26 14:57:49 +08:00
|
|
|
border-radius: 4px 4px 0 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-value {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
2017-12-26 14:57:49 +08:00
|
|
|
transform-origin: unset;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
.main-color-item {
|
|
|
|
padding-top: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.main-color-value {
|
|
|
|
bottom: 8px;
|
2019-02-15 10:48:07 +08:00
|
|
|
opacity: 0.7;
|
2017-12-26 14:57:49 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|