diff --git a/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-interactions-sunburst-slice-clicks-visually-looks-correct-1-snap.png b/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-interactions-sunburst-slice-clicks-visually-looks-correct-1-snap.png index 50128342374..935721b7736 100644 Binary files a/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-interactions-sunburst-slice-clicks-visually-looks-correct-1-snap.png and b/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-interactions-sunburst-slice-clicks-visually-looks-correct-1-snap.png differ diff --git a/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-treemap-mid-two-layers-visually-looks-correct-1-snap.png b/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-treemap-mid-two-layers-visually-looks-correct-1-snap.png index 6ac96cbe9c8..b33a52eeb02 100644 Binary files a/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-treemap-mid-two-layers-visually-looks-correct-1-snap.png and b/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-treemap-mid-two-layers-visually-looks-correct-1-snap.png differ diff --git a/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltips-should-show-tooltip-on-sunburst-1-snap.png b/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltips-should-show-tooltip-on-sunburst-1-snap.png index e6814e9a13d..28a4f3d1cee 100644 Binary files a/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltips-should-show-tooltip-on-sunburst-1-snap.png and b/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltips-should-show-tooltip-on-sunburst-1-snap.png differ diff --git a/integration/tests/__image_snapshots__/legend-stories-test-ts-legend-stories-should-hide-bar-series-legend-item-1-snap.png b/integration/tests/__image_snapshots__/legend-stories-test-ts-legend-stories-should-hide-bar-series-legend-item-1-snap.png index 084b69896c5..9e713178305 100644 Binary files a/integration/tests/__image_snapshots__/legend-stories-test-ts-legend-stories-should-hide-bar-series-legend-item-1-snap.png and b/integration/tests/__image_snapshots__/legend-stories-test-ts-legend-stories-should-hide-bar-series-legend-item-1-snap.png differ diff --git a/src/components/__snapshots__/chart.test.tsx.snap b/src/components/__snapshots__/chart.test.tsx.snap index 2d4e865b134..da5fc508e6c 100644 --- a/src/components/__snapshots__/chart.test.tsx.snap +++ b/src/components/__snapshots__/chart.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Chart should render the legend name test 1`] = `"
"`; +exports[`Chart should render the legend name test 1`] = `"
"`; diff --git a/src/components/legend/__snapshots__/legend.test.tsx.snap b/src/components/legend/__snapshots__/legend.test.tsx.snap index 73439392f5a..0b27c44ae68 100644 --- a/src/components/legend/__snapshots__/legend.test.tsx.snap +++ b/src/components/legend/__snapshots__/legend.test.tsx.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Legend #legendColorPicker should match snapshot after onChange is called 1`] = `"
  • "`; +exports[`Legend #legendColorPicker should match snapshot after onChange is called 1`] = `"
  • "`; -exports[`Legend #legendColorPicker should match snapshot after onClose is called 1`] = `"
  • "`; +exports[`Legend #legendColorPicker should match snapshot after onClose is called 1`] = `"
  • "`; exports[`Legend #legendColorPicker should render colorPicker when color is clicked 1`] = `"
    Custom Color Picker
    "`; -exports[`Legend #legendColorPicker should render colorPicker when color is clicked 2`] = `"
  • Custom Color Picker
  • "`; +exports[`Legend #legendColorPicker should render colorPicker when color is clicked 2`] = `"
  • Custom Color Picker
  • "`; diff --git a/src/components/legend/_legend_item.scss b/src/components/legend/_legend_item.scss index 10fbecf533e..7b653ee4b3a 100644 --- a/src/components/legend/_legend_item.scss +++ b/src/components/legend/_legend_item.scss @@ -6,7 +6,7 @@ $legendItemVerticalPadding: $echLegendRowGap / 2; flex-wrap: nowrap; justify-content: space-between; align-items: center; - width: 100%; + position: relative; &:not(&--hidden) { .echLegendItem__color--changable { @@ -16,12 +16,20 @@ $legendItemVerticalPadding: $echLegendRowGap / 2; } } - &:hover { + &:hover .background { background-color: $euiColorLightestShade; } + .background { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: -1; + } + &__action { - height: 100%; cursor: pointer; display: flex; justify-content: center; @@ -80,19 +88,17 @@ $legendItemVerticalPadding: $echLegendRowGap / 2; &--right, &--left { - margin-top: $legendItemVerticalPadding; - margin-bottom: $legendItemVerticalPadding; - } + padding-top: $legendItemVerticalPadding / 2; + padding-bottom: $legendItemVerticalPadding / 2; - @include internetExplorerOnly { - &--bottom, - &--top { - width: $echLegendMaxWidth; - margin-right: $euiSizeL; + &:first-of-type { + margin-top: $legendItemVerticalPadding / 2; } - margin-top: $legendItemVerticalPadding; - margin-bottom: $legendItemVerticalPadding; + .background { + margin-top: $legendItemVerticalPadding / 2; + margin-bottom: $legendItemVerticalPadding / 2; + } } &--hidden { diff --git a/src/components/legend/legend_item.tsx b/src/components/legend/legend_item.tsx index bcd1af1673d..bcc85c1d14d 100644 --- a/src/components/legend/legend_item.tsx +++ b/src/components/legend/legend_item.tsx @@ -230,6 +230,7 @@ export class LegendListItem extends Component style={style} data-ech-series-name={label} > +