You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2021/02/23 06:51:00 UTC

[superset] branch master updated: fix: style tweaks for inconsistent button spacing (#13254)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 8db5d43  fix: style tweaks for inconsistent button spacing (#13254)
8db5d43 is described below

commit 8db5d43969aa0dec0ecf990cbb5c86babd5c6ceb
Author: Evan Rusackas <ev...@preset.io>
AuthorDate: Mon Feb 22 22:49:59 2021 -0800

    fix: style tweaks for inconsistent button spacing (#13254)
    
    * fix: button margin glitches
    
    * removing unncessary fragment
    
    * removing grid gap
    
    * Revert "removing unncessary fragment"
    
    This reverts commit 659e27348f705a85d203a4c1b77d78188200614d.
---
 superset-frontend/src/SqlLab/main.less            | 1 -
 superset-frontend/src/components/Button/index.tsx | 8 ++++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/superset-frontend/src/SqlLab/main.less b/superset-frontend/src/SqlLab/main.less
index dad051b..02da819 100644
--- a/superset-frontend/src/SqlLab/main.less
+++ b/superset-frontend/src/SqlLab/main.less
@@ -372,7 +372,6 @@ div.tablePopover {
 .ResultSetButtons {
   display: grid;
   grid-auto-flow: column;
-  grid-gap: 4px;
   padding-right: 8px;
 }
 
diff --git a/superset-frontend/src/components/Button/index.tsx b/superset-frontend/src/components/Button/index.tsx
index cb500cc..2acc932 100644
--- a/superset-frontend/src/components/Button/index.tsx
+++ b/superset-frontend/src/components/Button/index.tsx
@@ -159,7 +159,7 @@ export default function Button(props: ButtonProps) {
     <AntdButton
       href={disabled ? undefined : href}
       disabled={disabled}
-      className={cx(className, { cta: !!cta })}
+      className={cx(className, 'superset-button', { cta: !!cta })}
       css={{
         display: 'inline-flex',
         alignItems: 'center',
@@ -199,9 +199,9 @@ export default function Button(props: ButtonProps) {
           backgroundColor: backgroundColorDisabled,
           borderColor: borderColorDisabled,
         },
-        marginLeft: theme.gridUnit * 2,
-        '&:first-of-type': {
-          marginLeft: 0,
+        marginLeft: 0,
+        '& + .superset-button': {
+          marginLeft: theme.gridUnit * 2,
         },
         '& :first-of-type': {
           marginRight: firstChildMargin,