| 1 |
.ghostkit-component-input-group-wrapper { |
| 2 |
display: flex; |
| 3 |
|
| 4 |
// Place items in a row. |
| 5 |
> div + div { |
| 6 |
margin-left: -1px; |
| 7 |
} |
| 8 |
|
| 9 |
> div:focus-within { |
| 10 |
z-index: 1; |
| 11 |
} |
| 12 |
|
| 13 |
> div:first-of-type input { |
| 14 |
border-top-right-radius: 0; |
| 15 |
border-bottom-right-radius: 0; |
| 16 |
} |
| 17 |
|
| 18 |
> div:first-of-type ~ div:not(:last-of-type) input { |
| 19 |
border-radius: 0; |
| 20 |
} |
| 21 |
|
| 22 |
> div:last-of-type input { |
| 23 |
border-top-left-radius: 0; |
| 24 |
border-bottom-left-radius: 0; |
| 25 |
} |
| 26 |
|
| 27 |
// Better help styles. |
| 28 |
.components-base-control__help { |
| 29 |
margin-top: -6px; |
| 30 |
font-size: 9px; |
| 31 |
font-weight: 500; |
| 32 |
text-align: center; |
| 33 |
text-transform: uppercase; |
| 34 |
opacity: 0.7; |
| 35 |
} |
| 36 |
|
| 37 |
// When input expanded, hide help text and make input transparent for siblings. |
| 38 |
&:has(.ghostkit-component-input-drag-expand) > div:not(:has(.ghostkit-component-input-drag-expand)) { |
| 39 |
.components-base-control__help { |
| 40 |
font-size: 0; |
| 41 |
|
| 42 |
&::first-letter { |
| 43 |
font-size: 9px; |
| 44 |
} |
| 45 |
} |
| 46 |
input { |
| 47 |
color: transparent; |
| 48 |
padding-left: 2px; |
| 49 |
padding-right: 2px; |
| 50 |
} |
| 51 |
} |
| 52 |
|
| 53 |
> div { |
| 54 |
position: relative; |
| 55 |
width: 100%; |
| 56 |
transition: width 0.2s ease; |
| 57 |
|
| 58 |
input { |
| 59 |
text-align: center; |
| 60 |
transition: padding 0.2s ease; |
| 61 |
} |
| 62 |
|
| 63 |
// Expand width when input focused. |
| 64 |
&:has(.ghostkit-component-input-drag-expand) { |
| 65 |
width: 1000%; |
| 66 |
} |
| 67 |
|
| 68 |
// Important toggle. |
| 69 |
.ghostkit-control-important-toggle { |
| 70 |
position: absolute; |
| 71 |
top: 6px; |
| 72 |
right: 1px; |
| 73 |
opacity: 0; |
| 74 |
} |
| 75 |
|
| 76 |
&:hover .ghostkit-control-important-toggle, |
| 77 |
&:has(input:focus) .ghostkit-control-important-toggle, |
| 78 |
.ghostkit-control-important-toggle:focus, |
| 79 |
.ghostkit-control-important-toggle.is-active { |
| 80 |
opacity: 1; |
| 81 |
} |
| 82 |
} |
| 83 |
} |
| 84 |
|