2023-06-15 17:47:49 +02:00
|
|
|
$preview-size: 2.625rem; // 42px
|
|
|
|
|
2019-01-02 00:11:47 +01:00
|
|
|
.chooser {
|
2022-08-02 10:29:08 +02:00
|
|
|
&.blank .chosen {
|
|
|
|
display: none;
|
2022-02-04 12:57:55 +01:00
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
|
2022-08-02 10:29:08 +02:00
|
|
|
&:not(.blank) .unchosen {
|
2019-01-02 00:11:47 +01:00
|
|
|
display: none;
|
|
|
|
}
|
2022-08-02 10:29:08 +02:00
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
|
2022-08-02 10:29:08 +02:00
|
|
|
// Very subdued button style specifically for choosers, as there can be a lot of
|
|
|
|
// chooser fields left unused on a page editing form.
|
2023-06-15 17:47:49 +02:00
|
|
|
.button.chooser__choose-button {
|
|
|
|
@apply w-label-3;
|
2022-08-02 10:29:08 +02:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2023-06-15 17:47:49 +02:00
|
|
|
color: theme('colors.text-button-outline-default');
|
2022-08-02 10:29:08 +02:00
|
|
|
border-color: transparent;
|
2023-06-15 17:47:49 +02:00
|
|
|
padding: theme('spacing.[1.5]');
|
2022-08-02 10:29:08 +02:00
|
|
|
|
|
|
|
.icon {
|
2023-06-15 17:47:49 +02:00
|
|
|
@include svg-icon(theme('spacing.4'), initial);
|
2022-08-02 10:29:08 +02:00
|
|
|
color: inherit;
|
|
|
|
margin-inline-end: 5px;
|
2022-02-04 12:57:55 +01:00
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
|
2022-08-02 10:29:08 +02:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2023-04-19 07:58:14 +02:00
|
|
|
color: theme('colors.surface-button-hover');
|
|
|
|
background-color: theme('colors.surface-page');
|
2022-02-04 12:57:55 +01:00
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
|
|
|
|
2022-08-02 10:29:08 +02:00
|
|
|
.chosen {
|
|
|
|
display: flex;
|
|
|
|
gap: theme('spacing.4');
|
|
|
|
align-items: center;
|
|
|
|
}
|
2022-02-04 12:57:55 +01:00
|
|
|
|
2022-08-02 10:29:08 +02:00
|
|
|
.chooser__preview {
|
|
|
|
display: grid;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2023-06-15 17:47:49 +02:00
|
|
|
width: $preview-size;
|
|
|
|
height: $preview-size;
|
2022-08-02 10:29:08 +02:00
|
|
|
// Prevent this item from getting smaller if the title is long.
|
|
|
|
flex-shrink: 0;
|
2023-04-19 07:58:14 +02:00
|
|
|
background-color: theme('colors.border-button-small-outline-default');
|
|
|
|
color: theme('colors.text-button');
|
2022-08-02 10:29:08 +02:00
|
|
|
border-radius: theme('borderRadius.sm');
|
|
|
|
|
|
|
|
@media (forced-colors: active) {
|
|
|
|
border: 1px solid transparent;
|
2022-02-04 12:57:55 +01:00
|
|
|
}
|
2019-01-02 00:11:47 +01:00
|
|
|
}
|
|
|
|
|
2022-08-02 10:29:08 +02:00
|
|
|
.chooser__title {
|
|
|
|
@apply w-body-text-large;
|
|
|
|
}
|
2022-02-04 12:57:55 +01:00
|
|
|
|
2022-08-02 10:29:08 +02:00
|
|
|
.chooser__image {
|
2023-06-15 17:47:49 +02:00
|
|
|
max-width: 165px;
|
|
|
|
max-height: 125px;
|
2022-08-02 10:29:08 +02:00
|
|
|
height: auto;
|
|
|
|
width: auto;
|
|
|
|
}
|
2022-09-14 17:30:37 +02:00
|
|
|
|
2023-06-15 17:47:49 +02:00
|
|
|
.chooser .w-dropdown__toggle--icon {
|
|
|
|
width: $preview-size;
|
|
|
|
height: $preview-size;
|
|
|
|
}
|
|
|
|
|
2022-09-14 17:30:37 +02:00
|
|
|
// Display these as inline block so that action icons such as comments can appear as close as possible
|
|
|
|
.w-field--admin_task_chooser,
|
|
|
|
.w-field--admin_page_chooser,
|
|
|
|
.w-field--document_chooser_widget,
|
|
|
|
.w-field--admin_image_chooser,
|
|
|
|
.w-field--admin_snippet_chooser {
|
|
|
|
display: inline-block;
|
|
|
|
}
|