// Color input styles
// ----------------------------------------------
/* SG
# Forms/Option input
```
```
*/
.CDB-OptionInput {
box-sizing: border-box;
width: 100%;
height: $baseSize * 4 - 2px;
border-radius: $baseSize / 2;
vertical-align: middle;
}
.CDB-OptionInput-container {
display: flex;
align-content: center;
align-items: center;
&--noMargin {
margin: 0;
}
}
.CDB-OptionInput-item {
display: flex;
position: relative;
box-sizing: content-box;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
font-size: $sFontSize-medium;
&.is-active,
&:hover,
&:focus {
cursor: pointer;
}
&:first-child {
width: auto;
margin-right: $baseSize;
}
&:last-child {
width: 100%;
}
}
.CDB-OptionInput-container--border .CDB-OptionInput-item {
padding: 0 $baseSize;
border: 1px solid $cMainLine;
&.is-active,
&:focus {
border: 1px solid $cBlackHover;
}
&:hover {
border: 1px solid $cBlueHover;
}
&:first-child {
margin-right: 0;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
&:hover {
+ .CDB-OptionInput-item::after {
content: none;
}
}
}
&:last-child {
border-radius: 4px;
}
+ .CDB-OptionInput-item {
border-left: none;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
&.is-active::after,
&:focus::after,
&:hover::after {
position: absolute;
left: -1px;
width: 1px;
height: calc(100% + 2px);
content: '';
}
&.is-active::after,
&:focus::after {
background-color: $cBlackHover;
}
&:hover::after {
background-color: $cBlueHover;
}
}
}
.CDB-OptionInput-content {
display: flex;
box-sizing: content-box;
align-items: center;
justify-content: center;
height: 100%;
color: $cMainBg;
white-space: nowrap;
&:hover {
text-decoration: none;
}
}