| 1 |
@import "../../variables"; |
| 2 |
|
| 3 |
.ghostkit-component-image-picker { |
| 4 |
--ghostkit-component-image-picker-item-size: 50%; |
| 5 |
|
| 6 |
&.ghostkit-component-image-picker-3 { |
| 7 |
--ghostkit-component-image-picker-item-size: 33.33%; |
| 8 |
} |
| 9 |
|
| 10 |
&.ghostkit-component-image-picker-4 { |
| 11 |
--ghostkit-component-image-picker-item-size: 25%; |
| 12 |
} |
| 13 |
|
| 14 |
&.ghostkit-component-image-picker-5 { |
| 15 |
--ghostkit-component-image-picker-item-size: 20%; |
| 16 |
} |
| 17 |
|
| 18 |
&.ghostkit-component-image-picker-6 { |
| 19 |
--ghostkit-component-image-picker-item-size: 16.66%; |
| 20 |
} |
| 21 |
|
| 22 |
.components-base-control__field { |
| 23 |
display: flex; |
| 24 |
flex-wrap: wrap; |
| 25 |
justify-content: space-between; |
| 26 |
|
| 27 |
> .components-base-control__label { |
| 28 |
min-width: 100%; |
| 29 |
} |
| 30 |
} |
| 31 |
|
| 32 |
.ghostkit-component-image-picker-item { |
| 33 |
display: flex; |
| 34 |
flex-direction: column; |
| 35 |
flex-shrink: 0; |
| 36 |
align-items: center; |
| 37 |
justify-content: flex-start; |
| 38 |
width: calc(var(--ghostkit-component-image-picker-item-size) - 4px); |
| 39 |
padding: 4px; |
| 40 |
margin: 4px 0; |
| 41 |
overflow: hidden; |
| 42 |
color: inherit; |
| 43 |
cursor: pointer; |
| 44 |
background: none; |
| 45 |
border: none; |
| 46 |
border-radius: 4px; |
| 47 |
|
| 48 |
&:hover { |
| 49 |
color: $dark-gray-900; |
| 50 |
background: $light-gray-100; |
| 51 |
} |
| 52 |
|
| 53 |
&.ghostkit-component-image-picker-item-active { |
| 54 |
color: $dark-gray-900; |
| 55 |
outline: 2px solid transparent; |
| 56 |
outline-offset: -2px; |
| 57 |
box-shadow: 0 0 0 2px $dark-gray-500; |
| 58 |
} |
| 59 |
|
| 60 |
&:focus { |
| 61 |
color: $dark-gray-900; |
| 62 |
outline: 2px solid transparent; |
| 63 |
outline-offset: -2px; |
| 64 |
box-shadow: 0 0 0 2px $blue-medium-focus; |
| 65 |
} |
| 66 |
|
| 67 |
svg, |
| 68 |
img { |
| 69 |
display: block; |
| 70 |
width: 100%; |
| 71 |
height: auto; |
| 72 |
border: 1px solid rgba($dark-gray-500, 0.2); |
| 73 |
border-radius: 4px; |
| 74 |
outline: 1px solid transparent; |
| 75 |
} |
| 76 |
|
| 77 |
span { |
| 78 |
display: block; |
| 79 |
padding: 4px 2px; |
| 80 |
text-align: center; |
| 81 |
} |
| 82 |
} |
| 83 |
} |
| 84 |
|