@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
48 lines (43 loc) • 1.52 kB
CSS
/*
* Full-width divider; content aligns to the card padding. The body above
* has no bottom padding, so scrolled content runs flush to the divider.
*
* The strip reserves one height: the text line plus its padding
* (#85231). Card.Root inherits box-sizing: border-box onto the strip, so
* the min is the full strip. Only xs padding-block fits: md would leave
* less than a compact control and grow the strip. The row centers what
* it holds; a runtime action never resizes the body.
*/
.widget-footer {
box-sizing: border-box;
min-block-size: calc(var(--wpds-typography-line-height-sm) + 2 * var(--wpds-dimension-padding-md));
padding-inline: var(--wp-ui-card-padding);
padding-block-start: var(--wpds-dimension-padding-xs);
padding-block-end: var(--wpds-dimension-padding-xs);
border-block-start-style: solid;
border-block-start-width: var(--wpds-border-width-xs);
border-block-start-color: var(--wpds-color-stroke-surface-neutral-weak);
}
.compact-actions {
margin-inline-start: auto;
}
.link-action {
display: inline-flex;
align-items: center;
}
/* High action with a declared icon: the icon rides as a prefix. */
.prefixed-action {
display: flex;
align-items: center;
gap: var(--wpds-dimension-gap-xs);
text-decoration: inherit;
}
/*
* Square the icon-only link via the Button override hooks for icon
* buttons; breathing room comes from the size, not from padding.
*/
.icon-action {
--wp-ui-button-aspect-ratio: 1;
--wp-ui-button-padding-inline: 0px;
--wp-ui-button-min-width: unset;
}