Skip to content

Commit 163b31f

Browse files
author
Victor George
committed
Style refactor to fix layout issues;
We should always use SCSS to the fullest. Copy-paste of styles introduces mistakes and is extremely hard to fix.
1 parent a1c92cd commit 163b31f

File tree

10 files changed

+239
-246
lines changed

10 files changed

+239
-246
lines changed
Lines changed: 15 additions & 8 deletions
Loading

src/components/TopBar/ProjectsToolBar.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ $tc-body-large: 20px;
193193
z-index: 22;/* +1 from z-index of the modal overlay */
194194
}
195195

196-
.FillProjectDetailsWrapper {
197-
margin-top: 0px;
198-
}
196+
// .FillProjectDetailsWrapper {
197+
// margin-top: -60px; // Counteract the push from the main wrapper, top of vewport
198+
// }
199199
}
200200

201201
.project-creation-dialog {

src/projects/create/components/FillProjectDetails.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class FillProjectDetails extends Component {
4848
return (
4949
<div className="FillProjectDetailsWrapper">
5050
<div className="header headerFillProjectDetails">
51-
{ (!userRoles || !userRoles.length) && <SVGIconImage filePath="connect-logo-mono" />}
51+
{ (!userRoles || !userRoles.length) && <SVGIconImage filePath="connect-logo-mono" className="connectLogo" />}
5252
{ (!userRoles || !userRoles.length) && <button className="tc-btn tc-btn-default tc-btn-sm" onClick={ this.props.onChangeProjectType }><SVGIconImage filePath="arrows-undo" />Change project type</button> }
5353
</div>
5454
<div className="FillProjectDetails">
@@ -69,7 +69,7 @@ class FillProjectDetails extends Component {
6969
/>
7070
</div>
7171
<div className="right-area">
72-
<Sticky top={80}>
72+
<Sticky top={20}>
7373
<ProjectOutline project={ dirtyProject } />
7474
<div className="right-area-footer">In 24 hours our project managers will contact you for more information and a detailed quote that accurately reflects your project needs.</div>
7575
</Sticky>

src/projects/create/components/FillProjectDetails.scss

Lines changed: 39 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,67 @@
1+
// Project form styles
2+
3+
@import 'layout';
14
@import 'tc-includes';
25

3-
@mixin flexBox {
4-
display: box;
5-
display: flex;
6-
flex-direction: row;
7-
width: auto;
6+
.FillProjectDetailsWrapper {
7+
// @extend .wizardWrapper;
88
}
99

10-
@mixin flexWidth($number) {
11-
-webkit-box-flex: $number;
12-
-moz-box-flex: $number;
13-
-webkit-flex: $number;
14-
-ms-flex: $number;
15-
flex: $number;
16-
}
1710
.headerFillProjectDetails {
18-
display: flex;
19-
justify-content: space-between;
20-
position: absolute;
21-
top: 25px;
22-
left: 20px;
23-
width: calc(100% - 40px);// 20px for left absolute position, 20px for padding around button in the header
24-
.tc-btn-default img {
25-
margin-right: 10px;
26-
}
27-
}
28-
29-
.FillProjectDetailsWrapper {
30-
margin-top: -20px;// to align top with bottom of the header
11+
@extend .wizardHeader;
3112
}
3213

3314
.FillProjectDetails {
34-
35-
.header {
36-
display: flex;
37-
justify-content: space-between;
38-
margin-bottom: 30px;
39-
40-
h1 {
41-
@include tc-heading;
42-
width: 100%;
43-
text-align: center;
44-
}
45-
46-
button {
47-
align-self: flex-end;
48-
white-space: nowrap;
49-
50-
.Icon {
51-
vertical-align: middle;
52-
margin-right: 2 * $base_unit;
53-
}
54-
}
15+
h1 {
16+
@extend .wizardHeadline;
5517
}
5618

57-
58-
.two-col-content.content {
19+
.two-col-content {
20+
padding: 0 !important;
21+
min-width: $minimumPageWidth;
5922

6023
.container {
6124
@include flexBox;
62-
background-color: transparent;
25+
align-self: flex-start;
26+
background-color: none;
6327
display: flex;
64-
padding: 0px;
65-
width: 1110px;
66-
margin: 20px auto;
28+
padding: 0;
29+
max-width: 1110px;
30+
margin: 0 auto;
31+
6732
/* .left-area */
6833
.left-area {
69-
@include flexWidth(2);
34+
flex: auto;
35+
width: auto;
7036
position: relative;
7137
border-radius: 4px;
7238
background: $tc-white;
7339
box-shadow: 0px 1px 3px 0px $tc-gray-30;
74-
padding: 5*$base-unit;
75-
margin-bottom: 20px;
40+
padding: 50px;
7641

7742
.title {
7843
color: $tc-gray-80;
7944
@include roboto-bold;
8045
}
8146

8247
.section-footer {
83-
margin-top: 4*$base_unit;
84-
margin-bottom: 0px;
48+
margin-top: $base_unit * 4;
49+
margin-bottom: 0;
8550
background: none;
51+
height: 40px;
8652
}
87-
8853
}
8954

9055
.right-area {
91-
@include flexWidth(1);
92-
margin-left: 4*$base_unit;
56+
flex: auto !important;
57+
width: 320px;
58+
min-width: 320px;
59+
max-width: 320px;
60+
margin-left: 4 * $base_unit;
9361

9462
.right-area-footer {
9563
@include roboto;
96-
padding: 10px 40px 0 0;
64+
padding: 10px 0 0 0;
9765
font-size: 13px;
9866
line-height: 20px;
9967
color: $tc-gray-50;
@@ -110,29 +78,19 @@
11078

11179
.ProjectWizard {
11280
.FillProjectDetails {
113-
.header h1{
114-
@include roboto-light;
115-
font-size: 36px;
116-
color: $tc-black;
117-
line-height: 40px;
81+
.left-area .title span,
82+
.section-header .section-number {
83+
display: none;
11884
}
119-
.two-col-content.content .container {
120-
margin-top: 0;
121-
.left-area .title span,
122-
.section-header .section-number {
123-
display: none;
124-
}
125-
.gray-text {
126-
@include roboto;
127-
font-size: 15px;
128-
color: $tc-gray-50;
129-
line-height: 25px;
130-
}
131-
.left-area {
132-
padding: 50px;
133-
}
85+
86+
.gray-text {
87+
@include roboto;
88+
font-size: 15px;
89+
color: $tc-gray-50;
90+
line-height: 25px;
13491
}
13592
}
93+
13694
.spec-question-list-item .content-col > h5 span {
13795
display: none;
13896
}
Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,55 @@
1+
// Incomplete page styles
2+
@import 'layout';
13
@import 'tc-includes';
24

35
.IncompleteProjectConfirmation {
46
width: 100%;
5-
min-height: calc(100vh - 40px);
6-
background: #fafafb;
77
display: flex;
88
flex-direction: column;
99
align-items: center;
10-
margin-top: -60px;// to align top with bottom of the header
11-
padding: 20px;
10+
1211
.header {
13-
position: absolute;
14-
left: 40px;
15-
top: 40px;
12+
@extend .wizardHeader;
13+
width: 100%;
1614
}
15+
1716
h3 {
18-
@include roboto-light;
19-
margin-top: 8 * $base_unit;
17+
@include roboto-light;
18+
margin-top: 8 * $base_unit;
2019
margin-bottom: 12 * $base_unit;
21-
color: $tc-black;
22-
line-height: 40px;
23-
font-size: 36px;
20+
color: $tc-black;
21+
line-height: 40px;
22+
font-size: 36px;
2423
}
24+
2525
h5 {
26-
@include roboto-medium;
27-
margin-bottom: 4 * $base_unit;
28-
color: $tc-gray-80;
29-
line-height: 30px;
30-
font-size: 20px;
26+
@include roboto-medium;
27+
margin-bottom: 4 * $base_unit;
28+
color: $tc-gray-80;
29+
line-height: 30px;
30+
font-size: 20px;
3131
}
32+
3233
p {
33-
@include roboto;
34-
margin-bottom: 10 * $base_unit;
35-
color: $tc-gray-60;
36-
line-height: 25px;
37-
font-size: 15px;
34+
@include roboto;
35+
margin-bottom: 10 * $base_unit;
36+
color: $tc-gray-60;
37+
line-height: 25px;
38+
font-size: 15px;
3839
}
40+
3941
.actions {
40-
button {
41-
display: block;
42-
margin: 0 auto;
43-
}
42+
button {
43+
display: block;
44+
margin: 0 auto;
45+
}
46+
4447
button + button {
4548
margin-top: 4 * $base_unit;
4649
}
4750
}
4851
}
52+
4953
.Footer {
5054
position: relative;
5155
}

0 commit comments

Comments
 (0)