chowa
Version:
UI component library based on React
284 lines (252 loc) • 5.93 kB
CSS
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
.cw-color-saturation {
width: 220px;
height: 220px;
position: relative;
margin: 0;
padding: 0; }
.cw-color-saturation-light,
.cw-color-saturation-dark {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: 0;
padding: 0; }
.cw-color-saturation-light {
background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0));
z-index: 1; }
.cw-color-saturation-dark {
background: linear-gradient(0deg, #000, transparent);
z-index: 2; }
.cw-color-saturation-pointer {
position: absolute;
z-index: 5;
width: 8px;
height: 8px;
box-sizing: border-box;
border: 1px solid #fff;
border-radius: 4px;
margin: 0 0 -4px -4px;
padding: 0;
cursor: pointer;
box-shadow: 0 0 6px 3px rgba(0, 0, 0, 0.15);
background: transparent; }
.cw-color-hue {
height: 220px;
width: 22px;
margin: 0 0 0 2px;
padding: 0;
box-sizing: border-box;
position: relative; }
.cw-color-hue-range {
height: 100%;
width: 14px;
margin: 0 0 0 8px;
padding: 0;
box-sizing: border-box;
background: linear-gradient(to top, #f00 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00);
cursor: pointer; }
.cw-color-hue-selector {
position: absolute;
left: 0;
width: 30px;
height: 12px;
margin: 0 0 -6px 0;
padding: 0;
cursor: pointer;
background: transparent; }
.cw-color-hue-selector-left-arrow,
.cw-color-hue-selector-right-arrow,
.cw-color-alpha-selector-top-arrow,
.cw-color-alpha-selector-down-arrow {
position: absolute;
margin: 0;
padding: 0;
width: 12px;
height: 12px;
overflow: hidden;
box-sizing: border-box;
font-size: 14px;
color: #888da8;
display: flex;
align-items: center;
justify-content: center; }
.cw-color-hue-selector-left-arrow {
left: 0; }
.cw-color-hue-selector-right-arrow {
right: 0; }
.cw-color-alpha-selector-top-arrow {
top: 0; }
.cw-color-alpha-selector-down-arrow {
bottom: 0; }
.cw-color-adjustment {
width: 268px;
margin: 0;
padding: 12px;
box-sizing: border-box; }
.cw-color-hsb {
margin: 0 0 12px 0;
padding: 0;
box-sizing: border-box;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start; }
.cw-color-alpha-wrapper {
margin: 0 0 12px 0;
padding: 8px 0;
box-sizing: border-box;
position: relative; }
.cw-color-alpha-bg {
height: 14px;
width: 100%;
margin: 0;
padding: 0;
box-sizing: border-box; }
.cw-color-alpha-range {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
box-sizing: border-box;
cursor: pointer; }
.cw-color-alpha-selector {
position: absolute;
top: 0;
bottom: 0;
width: 12px;
margin: 0 0 0 -6px;
padding: 0;
cursor: pointer;
background: transparent; }
.cw-color-recommend-wrapper {
padding: 0;
margin: 0;
box-sizing: border-box;
list-style: none;
display: flex;
flex-direction: row;
flex-wrap: wrap; }
.cw-color-recommend {
padding: 0;
margin: 0 0 12px 0;
box-sizing: border-box;
width: 20px;
height: 20px;
flex: none;
border: 1px solid #e6ecf5;
border-radius: 3px;
cursor: pointer;
position: relative; }
.cw-color-recommend + .cw-color-recommend {
margin-left: 12px; }
.cw-color-recommend:nth-child(8n + 1) {
margin-left: 0; }
.cw-color-active:before {
content: '';
width: 6px;
height: 6px;
box-sizing: border-box;
border: 1px solid #fff;
border-radius: 3px;
margin: 0 0 -3px -3px;
padding: 0;
left: 50%;
bottom: 50%;
position: absolute;
box-shadow: 0 0 6px 3px rgba(0, 0, 0, 0.15); }
.cw-color-input {
width: 100%;
height: 26px;
border-radius: 3px;
border: 1px solid #e6ecf5;
font-size: 12px;
outline: none;
transition: all 0.2s ease-in-out;
box-sizing: border-box;
padding: 0 8px;
margin: 0;
color: #616a6e; }
.cw-color-input:hover {
border-color: #7774e7; }
.cw-color-input:focus {
box-shadow: 0 1px 2px 3px rgba(119, 116, 231, 0.15);
border-color: #7774e7; }
.cw-color-btns {
padding: 0;
margin: 12px 0 0 0;
box-sizing: border-box;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end; }
.cw-color-picker {
height: 32px;
width: 120px;
border: 1px solid #e6ecf5;
background-color: #fff;
border-radius: 3px;
margin: 0;
padding: 0 0 0 14px;
box-sizing: border-box;
cursor: pointer;
transition: all 0.2s ease-in;
outline: none;
position: relative; }
.cw-color-picker:not(.cw-color-picker-disabled):hover {
border-color: #7774e7; }
.cw-color-picker.cw-color-picker-focused, .cw-color-picker:not(.cw-color-picker-disabled):focus {
box-shadow: 0 1px 2px 3px rgba(119, 116, 231, 0.15);
border-color: #7774e7; }
.cw-color-picker.cw-has-error {
border-color: #ed4014; }
.cw-color-arrow {
margin: 0;
padding: 0;
position: absolute;
right: 0;
top: 0;
display: flex;
align-items: center;
justify-content: center;
color: #888da8;
width: 30px;
height: 30px;
line-height: 30px;
font-size: 12px;
transition: all 0.2s ease-in; }
.cw-color-arrow-active {
transform: rotate(-180deg);
color: #7774e7; }
.cw-color-result {
width: 60px;
height: 20px;
margin: 5px 0;
padding: 0;
box-sizing: border-box; }
.cw-color-empty-result {
text-align: center;
color: #888da8;
font-size: 14px;
border: 1px solid #e6ecf5; }
.cw-color-display {
margin: 0;
padding: 0;
width: 100%;
height: 100%; }
.cw-color-picker-disabled {
background-color: #e9ecef;
cursor: not-allowed;
opacity: 0.6; }
.cw-color-alpha-bg,
.cw-color-with-alpah {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); }