Просмотр исходного кода

Wizard style refactoring fixing FF issues on windows

Remove 'float' from CSS, use instead flex grids.
Removed 'nth-child' from CSS.

Set overflow to auto for add cloud connection endpoints list
Sergiu Miclea 8 лет назад
Родитель
Сommit
2f71b5c0fe

+ 1 - 1
src/components/AddCloudConnection/AddCloudConnection.scss

@@ -128,7 +128,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 }
 .cloudList {
   height: 324px;
-  overflow-y: scroll;
+  overflow-y: auto;
   padding: 8px;
   .cloudImage {
     width: 128px;

+ 2 - 12
src/components/CloudItem/CloudItem.scss

@@ -18,19 +18,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 @import '../variables.scss';
 
 .root {
-  width: 255px;
-  float: left;
-  margin-bottom: 48px;
   height: 200px;
-  &:nth-child(3n+1) {
-
-  }
-  &:nth-child(3n+2) {
-    text-align: center;
-  }
-  &:nth-child(3n) {
-    text-align: right;
-  }
+  margin-left: 96px;
+  margin-top: 96px;
   &.selected {
     :global(.Dropdown-control) {
       background-color: $blue;

+ 1 - 12
src/components/MigrationWizard/MigrationWizard.scss

@@ -33,24 +33,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
     width: $wizard-content-width;
     margin: 0 auto 60px;
   }
-  :global {
-    .cloudCount_1 {
-      margin: 0 auto;
-      width: 33.3%;
-      padding-left: 64px;
-    }
-    .cloudCount_2 {
-      margin: 0 auto;
-      width: 66.6%;
-      padding-left: 32px;
-    }
-  }
 }
 .container {
   flex: 1;
   margin: 0 auto;
   padding: 0px 0px 70px 32px;
   overflow-y: auto;
+  overflow-x: hidden;
   width: $wizard-content-width;
 
 }

+ 1 - 1
src/components/WizardSource/WizardSource.js

@@ -147,7 +147,7 @@ class WizardSource extends Reflux.Component {
     return (
       <div className={s.root}>
         <div className={s.container}>
-          <div className={s.cloudList + " cloudCount_" + cloudCount}>
+          <div className={s.cloudList + (cloudCount < 3 ? ' ' + s.centered : '')}>
             {cloudList}
           </div>
         </div>

+ 9 - 0
src/components/WizardSource/WizardSource.scss

@@ -27,6 +27,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   max-width: $max-content-width;
 }
 .cloudList {
+  display: flex;
+  flex-wrap: wrap;
+  margin-left: -96px;
+  margin-top: -96px;
+
+  &.centered {
+    justify-content: center;
+  }
+  
   &:after {
     content: " ";
     display: block;

+ 1 - 1
src/components/WizardTarget/WizardTarget.js

@@ -148,7 +148,7 @@ class WizardTarget extends Component {
     return (
       <div className={s.root}>
         <div className={s.container}>
-          <div className={s.cloudList + " cloudCount_" + cloudCount}>
+          <div className={s.cloudList + (cloudCount < 3 ? ' ' + s.centered : '')}>
             {cloudList}
           </div>
         </div>

+ 9 - 1
src/components/WizardTarget/WizardTarget.scss

@@ -26,9 +26,17 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   padding: 0 0 40px;
   max-width: $max-content-width;
   width: $max-content-width;
-
+  
 }
 .cloudList {
+  display: flex;
+  flex-wrap: wrap;
+  margin-left: -96px;
+  margin-top: -96px;
+
+  &.centered {
+    justify-content: center;
+  }
 
   &:after {
     content: " ";

+ 1 - 1
src/components/variables.scss

@@ -42,7 +42,7 @@ $header-text-color: $blue;
 
 $max-content-width:     100%;
 $narrow-content-width: 928px;
-$wizard-content-width: 770px;
+$wizard-content-width: 800px;
 
 $border-radius: 4px;