From ea2cd3f697e718e5ad9c32dd909099aaeebafc57 Mon Sep 17 00:00:00 2001 From: Phillip Kelley-Dotson Date: Mon, 25 Oct 2021 20:43:35 -0700 Subject: [PATCH 1/2] remove variables --- .../components/DashboardBuilder/DashboardBuilder.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index 9d12b38600fb5..71ad156928408 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -73,16 +73,16 @@ const StyledDiv = styled.div` /* A row within a column has inset hover menu */ .dragdroppable-column .dragdroppable-row .hover-menu--left { left: -12px; - background: @lightest; - border: 1px solid @gray-light; + background: ${({ theme }) => theme.colors.grayscale.light5}; + border: 1px solid ${({ theme }) => theme.colors.grayscale.light2}; } /* A column within a column or tabs has inset hover menu */ .dragdroppable-column .dragdroppable-column .hover-menu--top, .dashboard-component-tabs .dragdroppable-column .hover-menu--top { top: -12px; - background: @lightest; - border: 1px solid @gray-light; + background: ${({ theme }) => theme.colors.grayscale.light5}; + border: 1px solid ${({ theme }) => theme.colors.grayscale.light2}; } /* move Tabs hover menu to top near actual Tabs */ From 43cc98b1832e107fd30904c20ea126509eba20a5 Mon Sep 17 00:00:00 2001 From: Phillip Kelley-Dotson Date: Wed, 27 Oct 2021 12:33:12 -0700 Subject: [PATCH 2/2] fix hovermenu styles --- .../dashboard/components/menu/HoverMenu.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/superset-frontend/src/dashboard/components/menu/HoverMenu.tsx b/superset-frontend/src/dashboard/components/menu/HoverMenu.tsx index 810c9441bfce6..5fbc37cbbfd58 100644 --- a/superset-frontend/src/dashboard/components/menu/HoverMenu.tsx +++ b/superset-frontend/src/dashboard/components/menu/HoverMenu.tsx @@ -30,16 +30,16 @@ const HoverStyleOverrides = styled.div` .hover-menu { opacity: 0; position: absolute; - z-index: @z-index-above-dashboard-charts; - font-size: @font-size-m; + z-index: 10; + font-size: ${({ theme }) => theme.typography.sizes.m}; } .hover-menu--left { - width: 24px; + width: ${({ theme }) => theme.gridUnit * 6}px; top: 50%; transform: translate(0, -50%); - left: -28px; - padding: 8px 0; + left: ${({ theme }) => theme.gridUnit * -7}px; + padding: ${({ theme }) => theme.gridUnit * 2}px 0; display: flex; flex-direction: column; justify-content: center; @@ -47,15 +47,15 @@ const HoverStyleOverrides = styled.div` } .hover-menu--left > :nth-child(n):not(:only-child):not(:last-child) { - margin-bottom: 12px; + margin-bottom: ${({ theme }) => theme.gridUnit * 3}px; } .hover-menu--top { - height: 24px; - top: -24px; + height: ${({ theme }) => theme.gridUnit * 6}px; + top: ${({ theme }) => theme.gridUnit * -6}px; left: 50%; transform: translate(-50%); - padding: 0 8px; + padding: 0 ${({ theme }) => theme.gridUnit * 2}px; display: flex; flex-direction: row; justify-content: center;