2022-07-25 16:20:19 +02:00
|
|
|
$header-icon-size: theme('spacing.4');
|
|
|
|
$header-button-size-mobile: $mobile-nice-padding;
|
|
|
|
$header-button-size: theme('spacing.8');
|
|
|
|
|
2022-07-25 16:15:31 +02:00
|
|
|
.w-panel {
|
|
|
|
margin-bottom: theme('spacing.10');
|
|
|
|
}
|
|
|
|
|
|
|
|
.w-panel__header {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2022-08-12 14:17:40 +02:00
|
|
|
margin-bottom: theme('spacing.3');
|
2022-07-25 16:20:19 +02:00
|
|
|
margin-inline-start: -1 * $mobile-nice-padding;
|
|
|
|
|
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
$gap: theme('spacing.1');
|
|
|
|
gap: $gap;
|
|
|
|
margin-inline-start: calc(-1 * 2 * ($header-button-size + $gap));
|
|
|
|
}
|
2022-07-25 16:15:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.w-panel__heading {
|
|
|
|
@apply w-h3;
|
|
|
|
display: inline-block;
|
|
|
|
margin: 0;
|
2022-10-14 14:51:46 +02:00
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
2022-07-25 16:20:19 +02:00
|
|
|
cursor: pointer;
|
2022-08-12 14:17:40 +02:00
|
|
|
padding-inline-end: theme('spacing.2');
|
|
|
|
|
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
padding-inline-end: theme('spacing.5');
|
|
|
|
}
|
2022-07-25 16:15:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.w-panel__heading--label {
|
|
|
|
@apply w-label-1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.w-panel__anchor,
|
2022-08-12 14:17:40 +02:00
|
|
|
.w-panel__toggle,
|
|
|
|
.w-panel__controls .button.button--icon,
|
|
|
|
.w-panel__controls-cue {
|
|
|
|
@include show-focus-outline-inside();
|
2022-07-25 16:15:31 +02:00
|
|
|
display: inline-grid;
|
|
|
|
justify-content: center;
|
|
|
|
align-content: center;
|
|
|
|
color: theme('colors.primary.DEFAULT');
|
2022-08-12 14:17:40 +02:00
|
|
|
border-radius: theme('borderRadius.full');
|
2022-10-14 14:51:46 +02:00
|
|
|
margin: 0;
|
2022-07-25 16:15:31 +02:00
|
|
|
padding: 0;
|
2022-07-25 16:20:19 +02:00
|
|
|
width: $header-button-size-mobile;
|
|
|
|
height: $header-button-size-mobile;
|
|
|
|
|
2022-08-12 14:17:40 +02:00
|
|
|
&:focus-visible,
|
|
|
|
&:hover {
|
|
|
|
background-color: $color-grey-5;
|
|
|
|
|
|
|
|
@media (forced-colors: active) {
|
|
|
|
border: 1px solid currentColor;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&[disabled] {
|
|
|
|
color: $color-grey-3;
|
|
|
|
cursor: not-allowed;
|
|
|
|
// Counter hover styles.
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
|
|
@media (forced-colors: active) {
|
|
|
|
color: GrayText;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-25 16:20:19 +02:00
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
width: $header-button-size;
|
|
|
|
height: $header-button-size;
|
|
|
|
}
|
2022-07-25 16:15:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.w-panel__anchor {
|
2022-07-25 16:20:19 +02:00
|
|
|
// Only hide anchors for devices that support hover interactions.
|
|
|
|
@media (hover: hover) {
|
2022-08-12 14:17:40 +02:00
|
|
|
.w-panel__header:not(:hover, :focus-within) & {
|
|
|
|
opacity: 0;
|
2022-07-25 16:20:19 +02:00
|
|
|
}
|
2022-07-25 16:15:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-12 14:17:40 +02:00
|
|
|
// The suffix anchor is intended for small viewports only.
|
|
|
|
.w-panel__anchor--suffix {
|
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// The prefix anchor can be used when there is enough space in the margin of the page.
|
|
|
|
.w-panel__anchor--prefix {
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
display: inline-grid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-25 16:15:31 +02:00
|
|
|
.w-panel__toggle {
|
|
|
|
appearance: none;
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.w-panel__icon {
|
2022-07-25 16:20:19 +02:00
|
|
|
width: $header-icon-size;
|
|
|
|
height: $header-icon-size;
|
2022-07-25 16:15:31 +02:00
|
|
|
|
2022-07-25 16:20:19 +02:00
|
|
|
// Only rotate the default caret icon, not custom ones.
|
|
|
|
[aria-expanded='false'] &.icon-arrow-down-big {
|
2022-07-25 16:15:31 +02:00
|
|
|
transform: rotate(-90deg);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.icon-link {
|
|
|
|
width: theme('spacing.[3.5]');
|
|
|
|
height: theme('spacing.[3.5]');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-12 14:17:40 +02:00
|
|
|
.w-panel__divider {
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.w-panel__controls {
|
2022-10-14 14:51:46 +02:00
|
|
|
// Prevent shrinking of the buttons when header text is long.
|
|
|
|
flex-shrink: 0;
|
2022-08-12 14:17:40 +02:00
|
|
|
// Add additional invisible padding for a more forgiving hover area.
|
|
|
|
padding: theme('spacing.4');
|
|
|
|
margin: calc(-1 * theme('spacing.4'));
|
|
|
|
margin-inline-end: calc(-1 * theme('spacing.8'));
|
|
|
|
margin-inline-start: 0;
|
|
|
|
|
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
margin: calc(-1 * theme('spacing.4'));
|
|
|
|
margin-inline-start: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// The cue is meant to be displayed on top of a real button.
|
|
|
|
> .w-panel__controls-cue {
|
|
|
|
position: absolute;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (hover: hover) {
|
|
|
|
// Hiding with opacity only, so the elements can still be focused.
|
|
|
|
> * {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .w-panel__controls-cue {
|
|
|
|
opacity: 1;
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
|
|
|
|
.w-panel__header:is(:hover, :focus-within) & > * {
|
|
|
|
opacity: 1;
|
|
|
|
|
|
|
|
// The cue should be fully hidden, not just transparent.
|
|
|
|
&.w-panel__controls-cue {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-25 16:20:19 +02:00
|
|
|
.w-panel__wrapper {
|
|
|
|
@include max-form-width();
|
2022-07-25 16:15:31 +02:00
|
|
|
}
|