mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +08:00
112 lines
1.9 KiB
Plaintext
112 lines
1.9 KiB
Plaintext
.color-palette {
|
|
margin: 45px 0;
|
|
}
|
|
|
|
.main-color {
|
|
overflow: hidden;
|
|
display: flex;
|
|
&-item {
|
|
flex: 1;
|
|
height: 80px;
|
|
border-radius: 4px;
|
|
float: left;
|
|
margin-right: 4px;
|
|
transition: all .2s;
|
|
position: relative;
|
|
text-align: center;
|
|
padding-top: 28px;
|
|
font-family: Consolas;
|
|
font-size: 12px;
|
|
&:last-child {
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
&-item &-value {
|
|
font-size: 12px;
|
|
position: absolute;
|
|
bottom: -4px;
|
|
transform: scale(0.85);
|
|
left: 0;
|
|
width: 100%;
|
|
text-align: center;
|
|
opacity: 0;
|
|
transition: all .2s ease .1s;
|
|
}
|
|
}
|
|
|
|
.color-title {
|
|
margin: 0 0 16px;
|
|
font-weight: 500;
|
|
color: #5c6b77;
|
|
font-size: 22px;
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.color-description {
|
|
font-size: 16px;
|
|
margin-left: 12px;
|
|
font-weight: normal;
|
|
color: #888;
|
|
}
|
|
|
|
.main-color:hover {
|
|
.main-color-item {
|
|
padding-top: 4px;
|
|
}
|
|
.main-color-value {
|
|
opacity: 0.7;
|
|
bottom: 3px;
|
|
}
|
|
}
|
|
|
|
.color-block {
|
|
position: relative;
|
|
width: 60px;
|
|
border-radius: @border-radius-base;
|
|
height: 28px;
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
margin-right: 8px;
|
|
cursor: pointer;
|
|
}
|
|
.color-block:after {
|
|
position: absolute;
|
|
top: 10px;
|
|
left: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
content: "Copied!";
|
|
font-size: 12px;
|
|
line-height: 28px;
|
|
text-align: center;
|
|
color: #444;
|
|
transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
|
|
opacity: 0;
|
|
}
|
|
.color-block.copied:after {
|
|
opacity: 1;
|
|
top: 0;
|
|
}
|
|
.color-block.dark:after {
|
|
color: #fff;
|
|
}
|
|
|
|
.make-palatte(@color, @index: 1) when (@index <= 10) {
|
|
.palatte-@{color}-@{index} {
|
|
@background: "@{color}-@{index}";
|
|
background: @@background;
|
|
}
|
|
.make-palatte(@color, (@index + 1)); // next iteration
|
|
}
|
|
|
|
.main-color {
|
|
.make-palatte(blue);
|
|
.make-palatte(purple);
|
|
.make-palatte(cyan);
|
|
.make-palatte(green);
|
|
.make-palatte(pink);
|
|
.make-palatte(red);
|
|
.make-palatte(orange);
|
|
.make-palatte(yellow);
|
|
}
|