|
@@ -1,37 +1,23 @@
|
|
|
+@import "./variables.scss";
|
|
|
+
|
|
|
+
|
|
|
$module: #{$prefix}-colorPicker;
|
|
|
|
|
|
|
|
|
.#{$module} {
|
|
|
|
|
|
&-colorChooseArea{
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
|
|
|
position: relative;
|
|
|
flex-grow: 1;
|
|
|
border-color: transparent;
|
|
|
- border-radius: 8px 8px 0 0;
|
|
|
- background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0)),
|
|
|
- linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
|
|
|
+ border-radius: $radius-colorPicker-topLeft $radius-colorPicker-topRight $radius-colorPicker-bottomLeft $radius-colorPicker-bottomRight;
|
|
|
+ background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
|
|
|
}
|
|
|
|
|
|
- .interactive{
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 0;
|
|
|
- right: 0;
|
|
|
- bottom: 0;
|
|
|
- border-radius: inherit;
|
|
|
- outline: none;
|
|
|
- /* Don't trigger the default scrolling behavior when the event is originating from this element */
|
|
|
- touch-action: none;
|
|
|
- }
|
|
|
|
|
|
&-handle{
|
|
|
-
|
|
|
- border-radius: 99999px;
|
|
|
- border: 2px solid var(--semi-color-white);
|
|
|
+ border-radius: $radius-colorPicker-handle;
|
|
|
+ border: $width-colorPicker_handle-border solid $color-colorPicker_handle-border;
|
|
|
position: absolute;
|
|
|
box-sizing: border-box;
|
|
|
cursor: grab;
|
|
@@ -43,21 +29,21 @@ $module: #{$prefix}-colorPicker;
|
|
|
&-alphaSlider{
|
|
|
position: relative;
|
|
|
cursor: pointer;
|
|
|
- margin-top: 6px;
|
|
|
- border-radius: var(--semi-border-radius-full);
|
|
|
+ margin-top: $spacing-colorPicker_slider-marginTop;
|
|
|
+ border-radius: $radius-colorPicker-handle;
|
|
|
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><rect x="8" width="8" height="8"/><rect y="8" width="8" height="8"/></svg>');
|
|
|
|
|
|
|
|
|
.#{$module}-alphaSliderInner{
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- border-radius: 4px;
|
|
|
+ border-radius: $radius-colorPicker-alphaSliderInner;
|
|
|
}
|
|
|
|
|
|
.#{$module}-alphaHandle{
|
|
|
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><rect x="8" width="8" height="8"/><rect y="8" width="8" height="8"/></svg>');
|
|
|
- border-radius: 99999px;
|
|
|
- border: 2px solid var(--semi-color-white);
|
|
|
+ border-radius: $radius-colorPicker-handle;
|
|
|
+ border: $width-colorPicker_handle-border solid $color-colorPicker_handle-border;
|
|
|
position: absolute;
|
|
|
box-sizing: border-box;
|
|
|
cursor: grab;
|
|
@@ -69,31 +55,22 @@ $module: #{$prefix}-colorPicker;
|
|
|
&-colorSlider{
|
|
|
position: relative;
|
|
|
cursor: pointer;
|
|
|
- margin-top: 6px;
|
|
|
- border-radius: var(--semi-border-radius-full);
|
|
|
- background: linear-gradient(
|
|
|
- to right,
|
|
|
- #f00 0%,
|
|
|
- #ff0 17%,
|
|
|
- #0f0 33%,
|
|
|
- #0ff 50%,
|
|
|
- #00f 67%,
|
|
|
- #f0f 83%,
|
|
|
- #f00 100%
|
|
|
- );
|
|
|
+ margin-top: $spacing-colorPicker_slider-marginTop;
|
|
|
+ border-radius: $radius-colorPicker-handle;
|
|
|
+ background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&-dataPart{
|
|
|
- margin-top: 8px;
|
|
|
+ margin-top: $spacing-colorPicker_dataPart-marginTop;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
.#{$module}-colorDemoBlock{
|
|
|
- border-radius: 4px;
|
|
|
+ border-radius: $radius-colorPicker-demoBlock;
|
|
|
}
|
|
|
.#{$module}-inputGroup{
|
|
|
- margin-left: 4px;
|
|
|
+ margin-left: $spacing-colorPicker_inputGroup-marginLeft;
|
|
|
width: 100%;
|
|
|
flex:1;
|
|
|
flex-wrap: nowrap;
|
|
@@ -101,19 +78,23 @@ $module: #{$prefix}-colorPicker;
|
|
|
flex: 1;
|
|
|
}
|
|
|
.#{$module}-colorPickerInputNumber{
|
|
|
- width: 60px;
|
|
|
+ width: $width-colorPicker-colorPickerInputNumber;
|
|
|
.#{$module}-inputNumberSuffix{
|
|
|
- font-size: 14px;
|
|
|
- padding: 0 4px;
|
|
|
+ font-size: $font-colorPicker_inputNumberSuffix-fontSize;
|
|
|
+ padding: $spacing-colorPicker_inputNumberSuffix-vertical $spacing-colorPicker_inputNumberSuffix-horizontal;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
.#{$module}-formatSelect{
|
|
|
- width: 76px;
|
|
|
+ width: $width-colorPicker-formatSelect;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
+ &-popover{
|
|
|
+ padding: $spacing-colorPicker_popover-padding;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|