diff --git a/projects/packages/premium-analytics/changelog/fix-pa-metric-tabs-hover-background b/projects/packages/premium-analytics/changelog/fix-pa-metric-tabs-hover-background new file mode 100644 index 000000000000..a8e80b5db3a0 --- /dev/null +++ b/projects/packages/premium-analytics/changelog/fix-pa-metric-tabs-hover-background @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Metric cards: Remove the grey box that appears inside a metric card on hover when a newer version of the WordPress UI library is loaded. diff --git a/projects/packages/premium-analytics/packages/widgets-toolkit/src/components/metric-tabs-chart/metric-tabs-chart.module.scss b/projects/packages/premium-analytics/packages/widgets-toolkit/src/components/metric-tabs-chart/metric-tabs-chart.module.scss index ad776f3abe68..1a7c0318f667 100644 --- a/projects/packages/premium-analytics/packages/widgets-toolkit/src/components/metric-tabs-chart/metric-tabs-chart.module.scss +++ b/projects/packages/premium-analytics/packages/widgets-toolkit/src/components/metric-tabs-chart/metric-tabs-chart.module.scss @@ -97,6 +97,17 @@ background-color: var(--wpds-color-background-surface-brand); } +/* The Tab paints its hover fill and focus ring on `::after`, sized for a 48px + * tab. Stretch it to the card so the ring follows the card edge, and drop its + * fill, which the card fill above replaces. */ +.tab::after { + inset: 0; + border-radius: inherit; + outline-offset: calc(-1 * var(--wpds-border-width-focus)); + background-color: transparent; + box-shadow: none; +} + /* A lone metric has nothing to switch to: it reads as the widget's headline * figure rather than a control, so it drops the card fill and the pointer. */ .singleMetric .tab { diff --git a/projects/plugins/jetpack/changelog/fix-pa-metric-tabs-hover-background b/projects/plugins/jetpack/changelog/fix-pa-metric-tabs-hover-background new file mode 100644 index 000000000000..98fde73bd3f8 --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-pa-metric-tabs-hover-background @@ -0,0 +1,4 @@ +Significance: patch +Type: bugfix + +Premium Analytics: Remove the grey box that appears inside a metric card on hover when a newer version of the WordPress UI library is loaded. diff --git a/projects/plugins/premium-analytics/changelog/fix-pa-metric-tabs-hover-background b/projects/plugins/premium-analytics/changelog/fix-pa-metric-tabs-hover-background new file mode 100644 index 000000000000..a8e80b5db3a0 --- /dev/null +++ b/projects/plugins/premium-analytics/changelog/fix-pa-metric-tabs-hover-background @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Metric cards: Remove the grey box that appears inside a metric card on hover when a newer version of the WordPress UI library is loaded.