ant-design-vue/components/color-picker/style/index.less

122 lines
2.8 KiB
Plaintext
Raw Normal View History

@import '../../style/themes/index';
@import '../../input/style/mixin';
2020-07-03 10:12:44 +00:00
@color-picker-prefix-cls: ~'@{ant-prefix}-color-picker';
.@{color-picker-prefix-cls} {
2020-07-03 10:12:44 +00:00
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5;
list-style: none;
font-feature-settings: 'tnum';
position: relative;
display: inline-block;
outline: none;
cursor: pointer;
transition: opacity 0.3s;
min-width: 55px;
.pickr {
display: inline-block;
2020-07-03 10:12:44 +00:00
.pcr-button {
width: 18px;
height: 18px;
margin-left: 7px;
&:focus {
box-shadow: none;
}
}
2020-07-03 10:12:44 +00:00
}
&.@{color-picker-prefix-cls}-disabled {
cursor: not-allowed;
.@{color-picker-prefix-cls}-selection {
background: @input-disabled-bg;
box-shadow: none;
border: @border-width-base @border-style-base @select-border-color;
&:hover,
&:focus,
&:active {
border: @border-width-base @border-style-base @select-border-color;
2020-07-03 10:12:44 +00:00
box-shadow: none;
}
2020-07-03 10:12:44 +00:00
}
&.@{color-picker-prefix-cls}-open {
.@{color-picker-prefix-cls}-icon {
& svg {
transform: none;
}
}
}
}
&-open {
.@{color-picker-prefix-cls}-icon {
& svg {
transform: rotate(180deg);
}
}
.@{color-picker-prefix-cls}-selection {
.active();
}
}
2020-07-03 10:12:44 +00:00
&-selection {
display: block;
box-sizing: border-box;
background-color: @select-background;
border: @border-width-base @border-style-base @select-border-color;
border-top-width: @border-width-base + 0.02px;
border-radius: @border-radius-base;
outline: none;
transition: all 0.3s @ease-in-out;
user-select: none;
position: relative;
height: @input-height-base;
cursor: inherit;
&:hover {
2020-12-27 06:50:32 +00:00
.hover();
}
}
2020-07-03 10:12:44 +00:00
&-icon {
.iconfont-mixin();
position: absolute;
top: 50%;
right: @control-padding-horizontal - 4px;
2020-12-27 06:50:32 +00:00
margin-top: (-@font-size-sm / 2);
color: @disabled-color;
font-size: @font-size-sm;
line-height: 1;
transform-origin: 50% 50%;
& svg {
transition: transform 0.3s;
}
}
&-lg {
font-size: @font-size-lg;
.@{color-picker-prefix-cls}-selection {
line-height: @input-height-lg - 12;
height: @input-height-lg;
}
.@{color-picker-prefix-cls}-icon {
2020-12-27 06:50:32 +00:00
top: (@input-height-lg / 2);
}
}
&-sm {
.@{color-picker-prefix-cls}-selection {
line-height: @input-height-sm - 12;
height: @input-height-sm;
}
2020-07-03 10:12:44 +00:00
.pickr .pcr-button {
width: 14px;
height: 14px;
}
.@{color-picker-prefix-cls}-icon {
right: @control-padding-horizontal - 2px;
2020-12-27 06:50:32 +00:00
top: (@input-height-sm / 2);
font-size: 10px;
}
}
}