File size: 2,036 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
@import "@wordpress/base-styles/variables";
.dashboard-summary-button-list {
.dashboard-summary-button-list__children-list {
list-style: none;
padding: 0;
margin: 0;
}
.dashboard-summary-button-list__children-list-item {
&:empty {
display: none;
}
}
&.has-density-low {
// Do not add a bottom margin to the last (non-empty) child.
.dashboard-summary-button-list__children-list-item:not(:nth-last-child(1 of :not(:empty))) {
margin-bottom: $grid-unit-30;
}
}
&.has-density-medium {
.dashboard-summary-button-list__children-list-wrapper {
// TODO: remove once the `CardBody` natively supports having no padding.
padding: 0;
}
// Inherit the card border radius all the way to the each child button.
// TODO: once the component uses React context, we should use that
// to let the summary button component know the appropriate border
// radius inheritance behavior.
.dashboard-summary-button-list__children-list {
border-radius: inherit;
}
// First (non-empty) <li> and its direct children.
.dashboard-summary-button-list__children-list-item:nth-child(1 of :not(:empty)),
.dashboard-summary-button-list__children-list-item:nth-child(1 of :not(:empty)) > * {
border-top-left-radius: inherit;
border-top-right-radius: inherit;
}
// Last (non-empty) <li> and its direct children.
.dashboard-summary-button-list__children-list-item:nth-last-child(1 of :not(:empty)),
.dashboard-summary-button-list__children-list-item:nth-last-child(1 of :not(:empty)) > * {
// TODO: once the component uses React context, we should use that
// to let the correct summary button component know that it's
// the last child, and should not have a bottom border.
border-bottom: none;
border-bottom-left-radius: inherit;
border-bottom-right-radius: inherit;
}
// Ensure focused elements appear above adjacent hovered elements.
.dashboard-summary-button-list__children-list-item:has( *:focus, *:focus-visible ) {
position: relative;
z-index: 1;
}
}
}
|