@layer wp-ui { @layer utilities, components, compositions, overrides; @layer components { .positioner { z-index: var(--wp-ui-tooltip-z-index, initial); } .popup { /* * Temporary hack: swap the foreground and background tokens to * invert the theme. Other tokens inside the popup are not * inverted. See https://github.com/WordPress/gutenberg/issues/87834. */ background-color: var(--wpds-color-foreground-content-neutral); padding: var(--wpds-dimension-padding-xs) var(--wpds-dimension-padding-sm); border-radius: var(--wpds-border-radius-md); font-family: var(--wpds-typography-font-family-body); font-size: var(--wpds-typography-font-size-sm); line-height: 1.4; /* TODO: use DS token for line height */ color: var(--wpds-color-background-surface-neutral); box-shadow: var(--wpds-shadow-outer-sm); /* * Forced-colors mode strips `box-shadow` and replaces the * `background-color` with `Canvas`, so the tooltip would merge * into the page. A 1px `CanvasText` border restores the edge. * The popup inherits `box-sizing: border-box` from the * positioner (via the shared `.box-sizing` reset utility), so * the 1px is absorbed and non-FC layout is unchanged. */ @media ( forced-colors: active ) { border: 1px solid CanvasText; } } } }