kopia lustrzana https://github.com/wagtail/wagtail
Adjust block chooser styles to match latest designs
rodzic
f8fb1d6d36
commit
53df6a2492
|
@ -1,8 +1,8 @@
|
||||||
// Ensure consistent spacing across the whole component.
|
// Ensure consistent spacing across the whole component.
|
||||||
// With the scrolling and show/hide of the field, correct spacing is critical.
|
// With the scrolling and show/hide of the field, correct spacing is critical.
|
||||||
$spacing: theme('spacing.[2.5]');
|
$spacing: theme('spacing.[2.5]');
|
||||||
$spacing-sm: theme('spacing.5');
|
$spacing-sm: theme('spacing.4');
|
||||||
$width: min(1000px, 75vw);
|
$width: clamp(300px, 75vw, 1000px);
|
||||||
|
|
||||||
.w-combobox-container {
|
.w-combobox-container {
|
||||||
@include dark-theme() {
|
@include dark-theme() {
|
||||||
|
@ -28,9 +28,9 @@ $width: min(1000px, 75vw);
|
||||||
|
|
||||||
// Case 1: base case
|
// Case 1: base case
|
||||||
// Use max-content width to minimize shifting due to content wrapping,
|
// Use max-content width to minimize shifting due to content wrapping,
|
||||||
// while also ensuring it's not wider than 75% of the viewport.
|
// constraining width to 75% of viewport for devices above 400px width.
|
||||||
width: max-content;
|
width: max-content;
|
||||||
max-width: 75vw;
|
max-width: max(300px, 75vw);
|
||||||
|
|
||||||
// Case 2: there's a previewable block, but the preview may or may not be active
|
// Case 2: there's a previewable block, but the preview may or may not be active
|
||||||
// On smaller screens, the preview will be shown below. We don't want the
|
// On smaller screens, the preview will be shown below. We don't want the
|
||||||
|
@ -87,12 +87,13 @@ $width: min(1000px, 75vw);
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-auto-flow: column;
|
grid-auto-flow: column;
|
||||||
gap: theme('spacing.[0.5]');
|
gap: theme('spacing.1');
|
||||||
padding: $spacing;
|
padding: $spacing;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
|
|
||||||
@include media-breakpoint-up(sm) {
|
@include media-breakpoint-up(sm) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
column-gap: theme('spacing.5');
|
||||||
padding: $spacing-sm;
|
padding: $spacing-sm;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
@ -120,15 +121,22 @@ $width: min(1000px, 75vw);
|
||||||
}
|
}
|
||||||
|
|
||||||
.w-combobox__option-preview {
|
.w-combobox__option-preview {
|
||||||
|
@include more-contrast-interactive();
|
||||||
|
@include show-focus-outline-inside();
|
||||||
|
color: theme('colors.icon-secondary');
|
||||||
background: none;
|
background: none;
|
||||||
|
border: 1px solid transparent;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
color: theme('colors.icon-secondary');
|
|
||||||
width: theme('spacing.3');
|
width: theme('spacing.3');
|
||||||
height: theme('spacing.3');
|
height: theme('spacing.3');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: theme('colors.icon-secondary-hover');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.w-combobox__option-row--col1 {
|
.w-combobox__option-row--col1 {
|
||||||
|
@ -143,17 +151,17 @@ $width: min(1000px, 75vw);
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: theme('spacing.8') 1fr;
|
grid-template-columns: theme('spacing.8') 1fr;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: theme('spacing.2');
|
padding: theme('spacing.[2.5]');
|
||||||
border: 1px solid transparent;
|
border: 1px dotted theme('colors.border-button-small-outline-default');
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
line-height: theme('lineHeight.tight');
|
line-height: theme('lineHeight.tight');
|
||||||
border-radius: theme('borderRadius.sm');
|
border-radius: theme('borderRadius.sm');
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&[aria-selected='true'] {
|
&[aria-selected='true'] {
|
||||||
border-color: theme('colors.border-button-outline-default');
|
border-color: theme('colors.border-button-outline-default');
|
||||||
color: theme('colors.text-link-default');
|
color: theme('colors.text-link-default');
|
||||||
background: transparent;
|
background: transparent;
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
@media (forced-colors: active) {
|
@media (forced-colors: active) {
|
||||||
background: Highlight;
|
background: Highlight;
|
||||||
|
|
Ładowanie…
Reference in New Issue