ant-design/site/theme/static/colors.less

177 lines
3.0 KiB
Plaintext
Raw Normal View History

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
}
@gray-1: #fff;
@gray-2: #fafafa;
@gray-3: #f5f5f5;
2019-11-13 20:31:23 +08:00
@gray-4: #f0f0f0;
@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;
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;
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;
margin-left: 16px;
font-size: 14px;
font-family: Consolas, sans-serif;
2018-04-27 22:09:49 +08:00
}
&-validation {
position: relative;
top: -3px;
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);
.make-palette(gray);
2019-04-15 10:52:00 +08:00
text-align: left;
2019-01-28 16:09:11 +08:00
2017-01-04 15:13:55 +08:00
&-item {
position: relative;
2017-10-13 20:27:22 +08:00
height: 44px;
margin-right: 4px;
padding: 0 12px;
2017-10-13 20:27:22 +08:00
font-size: 14px;
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;
}
&:last-child {
2017-10-13 20:27:22 +08:00
border-radius: 0 0 4px 4px;
}
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;
transition: all 0.3s;
2017-10-09 18:24:12 +08:00
}
2017-01-04 15:13:55 +08:00
&-item &-value {
position: relative;
left: 3px;
2017-10-13 20:27:22 +08:00
float: right;
transform: scale(0.85);
2017-10-19 17:02:02 +08:00
transform-origin: 100% 50%;
opacity: 0;
2018-12-07 16:17:45 +08:00
transition: all 0.3s;
}
2016-03-03 17:23:08 +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;
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;
text-transform: capitalize;
2016-03-03 17:23:08 +08:00
}
.color-description {
2017-03-03 13:48:22 +08:00
display: block;
color: #777;
font-weight: lighter;
font-size: 14px;
2016-03-03 17:23:08 +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;
opacity: 0.7;
}
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;
flex: 1;
2017-12-26 14:57:49 +08:00
height: 86px;
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;
text-align: center;
border-radius: 0;
2017-12-26 14:57:49 +08:00
.main-color-text {
float: none;
}
&:hover {
height: 96px;
margin-top: -10px;
2017-12-26 14:57:49 +08:00
border-radius: 4px 4px 0 0;
}
}
&-value {
position: absolute;
bottom: 0;
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;
opacity: 0.7;
2017-12-26 14:57:49 +08:00
}
}
}
}