You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2025/05/15 07:24:33 UTC

(superset) 11/13: stripping less

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

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

commit e4bd9ee9d8dfc1d984f1f998468449990174c831
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Wed May 14 23:59:28 2025 -0700

    stripping less
---
 .../src/assets/stylesheets/superset.less           | 117 ---------------------
 .../src/assets/stylesheets/superset.less.hbs       | 117 ---------------------
 .../src/components/Datasource/DatasourceEditor.jsx |   6 +-
 3 files changed, 5 insertions(+), 235 deletions(-)

diff --git a/superset-frontend/src/assets/stylesheets/superset.less b/superset-frontend/src/assets/stylesheets/superset.less
index 0ad8c76adc..a00ebd9db5 100644
--- a/superset-frontend/src/assets/stylesheets/superset.less
+++ b/superset-frontend/src/assets/stylesheets/superset.less
@@ -18,7 +18,6 @@
  */
 @import './less/index.less';
 @import './less/variables.less';
-@import './less/index.less';
 
 @datasource-sql-expression-width: 315px;
 
@@ -35,10 +34,6 @@
   font-size: @font-size-s;
 }
 
-.slice_info {
-  cursor: pointer;
-}
-
 .widget-is-cached {
   display: none;
 }
@@ -54,11 +49,6 @@
   border: 1px solid @gray;
 }
 
-hr {
-  margin-top: 15px;
-  margin-bottom: 15px;
-}
-
 span.title-block {
   background-color: @gray-bg;
   border-radius: @border-radius-large;
@@ -80,10 +70,6 @@ img.viz-thumb-option {
   border-radius: @border-radius-large;
 }
 
-.select2-drop.bigdrop .select2-results {
-  max-height: 700px;
-}
-
 .editable-title input {
   outline: none;
   background: transparent;
@@ -213,18 +199,6 @@ img.viz-thumb-option {
   margin-left: 25px;
 }
 
-.p-l-0 {
-  padding-left: 0;
-}
-
-.p-t-8 {
-  padding-top: 8;
-}
-
-.p-r-2 {
-  padding-right: 2;
-}
-
 .list-container {
   position: relative;
 }
@@ -286,17 +260,6 @@ img.viz-thumb-option {
   padding-bottom: 15px;
 }
 
-.list-add-action .btn.btn-sm {
-  padding: 6px 6px;
-  font-size: @font-size-xs;
-  line-height: 2px;
-  border-radius: 50%;
-  box-shadow: 2px 2px 4px -1px fade(@darkest, @opacity-light);
-  i {
-    width: 10px;
-  }
-}
-
 iframe {
   border: none;
   width: 100%;
@@ -313,83 +276,3 @@ iframe {
 .popover {
   max-width: 500px;
 }
-
-.float-left {
-  float: left;
-}
-
-.float-right {
-  float: right;
-}
-
-g.annotation-container {
-  line {
-    stroke: @brand-primary;
-  }
-
-  rect.annotation {
-    stroke: @brand-primary;
-    fill-opacity: 0.1;
-    stroke-width: 1;
-  }
-}
-
-.stroke-primary {
-  stroke: @brand-primary;
-}
-
-.reactable-header-sortable {
-  position: relative;
-  padding-right: 40px;
-
-  &::after {
-    font: normal normal normal 14px/1 FontAwesome;
-    content: '\f0dc';
-    margin-left: 10px;
-    color: @brand-primary;
-  }
-}
-
-.reactable-header-sort-asc::after {
-  content: '\f0de';
-  color: @brand-primary;
-}
-
-.reactable-header-sort-desc::after {
-  content: '\f0dd';
-  color: @brand-primary;
-}
-
-tr.reactable-column-header th.reactable-header-sortable {
-  padding-right: 17px;
-}
-
-.align-right {
-  text-align: right;
-}
-
-td.filtered {
-  background-color: lighten(desaturate(@brand-primary, 50%), 50%);
-}
-
-.table-name {
-  font-size: @font-size-l;
-}
-.select2-container-multi {
-  width: 100% !important;
-}
-
-/*
-Hides the logo while loading the page.
-Emotion styles will take care of the correct styling
-*/
-.navbar-brand {
-  display: none;
-}
-hr {
-  border-top: 1px solid @gray-light;
-}
-.ace_gutter-cell.ace_error {
-  background-image: url('../images/icons/error_solid_small_red.svg') !important;
-  background-position: -2px center !important;
-}
diff --git a/superset-frontend/src/assets/stylesheets/superset.less.hbs b/superset-frontend/src/assets/stylesheets/superset.less.hbs
index 0ad8c76adc..a00ebd9db5 100644
--- a/superset-frontend/src/assets/stylesheets/superset.less.hbs
+++ b/superset-frontend/src/assets/stylesheets/superset.less.hbs
@@ -18,7 +18,6 @@
  */
 @import './less/index.less';
 @import './less/variables.less';
-@import './less/index.less';
 
 @datasource-sql-expression-width: 315px;
 
@@ -35,10 +34,6 @@
   font-size: @font-size-s;
 }
 
-.slice_info {
-  cursor: pointer;
-}
-
 .widget-is-cached {
   display: none;
 }
@@ -54,11 +49,6 @@
   border: 1px solid @gray;
 }
 
-hr {
-  margin-top: 15px;
-  margin-bottom: 15px;
-}
-
 span.title-block {
   background-color: @gray-bg;
   border-radius: @border-radius-large;
@@ -80,10 +70,6 @@ img.viz-thumb-option {
   border-radius: @border-radius-large;
 }
 
-.select2-drop.bigdrop .select2-results {
-  max-height: 700px;
-}
-
 .editable-title input {
   outline: none;
   background: transparent;
@@ -213,18 +199,6 @@ img.viz-thumb-option {
   margin-left: 25px;
 }
 
-.p-l-0 {
-  padding-left: 0;
-}
-
-.p-t-8 {
-  padding-top: 8;
-}
-
-.p-r-2 {
-  padding-right: 2;
-}
-
 .list-container {
   position: relative;
 }
@@ -286,17 +260,6 @@ img.viz-thumb-option {
   padding-bottom: 15px;
 }
 
-.list-add-action .btn.btn-sm {
-  padding: 6px 6px;
-  font-size: @font-size-xs;
-  line-height: 2px;
-  border-radius: 50%;
-  box-shadow: 2px 2px 4px -1px fade(@darkest, @opacity-light);
-  i {
-    width: 10px;
-  }
-}
-
 iframe {
   border: none;
   width: 100%;
@@ -313,83 +276,3 @@ iframe {
 .popover {
   max-width: 500px;
 }
-
-.float-left {
-  float: left;
-}
-
-.float-right {
-  float: right;
-}
-
-g.annotation-container {
-  line {
-    stroke: @brand-primary;
-  }
-
-  rect.annotation {
-    stroke: @brand-primary;
-    fill-opacity: 0.1;
-    stroke-width: 1;
-  }
-}
-
-.stroke-primary {
-  stroke: @brand-primary;
-}
-
-.reactable-header-sortable {
-  position: relative;
-  padding-right: 40px;
-
-  &::after {
-    font: normal normal normal 14px/1 FontAwesome;
-    content: '\f0dc';
-    margin-left: 10px;
-    color: @brand-primary;
-  }
-}
-
-.reactable-header-sort-asc::after {
-  content: '\f0de';
-  color: @brand-primary;
-}
-
-.reactable-header-sort-desc::after {
-  content: '\f0dd';
-  color: @brand-primary;
-}
-
-tr.reactable-column-header th.reactable-header-sortable {
-  padding-right: 17px;
-}
-
-.align-right {
-  text-align: right;
-}
-
-td.filtered {
-  background-color: lighten(desaturate(@brand-primary, 50%), 50%);
-}
-
-.table-name {
-  font-size: @font-size-l;
-}
-.select2-container-multi {
-  width: 100% !important;
-}
-
-/*
-Hides the logo while loading the page.
-Emotion styles will take care of the correct styling
-*/
-.navbar-brand {
-  display: none;
-}
-hr {
-  border-top: 1px solid @gray-light;
-}
-.ace_gutter-cell.ace_error {
-  background-image: url('../images/icons/error_solid_small_red.svg') !important;
-  background-position: -2px center !important;
-}
diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
index defd724488..f8c1474dff 100644
--- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
+++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
@@ -1033,7 +1033,11 @@ class DatasourceEditor extends PureComponent {
             <div>{t('Click the lock to prevent further changes.')}</div>
           )}
         </EditLockContainer>
-        <div className="m-l-10 m-t-20 m-b-10">
+        <div
+          css={theme => css`
+            margin-top: ${theme.sizeUnit * 3}px;
+          `}
+        >
           {DATASOURCE_TYPES_ARR.map(type => (
             <Radio
               key={type.key}