Skip to content

Commit baf80af

Browse files
author
Bee Kay
committed
refactor: added flexbox to project, added additional scss properties, condensed code, removed unnecessary classes and properties
1 parent b8d2162 commit baf80af

File tree

1 file changed

+72
-63
lines changed

1 file changed

+72
-63
lines changed

scss/base/_base-styles.scss

Lines changed: 72 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55
$base-color: #6b5d8c;
66
$main-text: #fff;
77
$portfolio-bg: #fff;
8+
$mobile-link: #000;
89

10+
/*-----BASE ELEMENT STYLES-----*/
911

10-
/*Base Element Styles*/
1112
* {
1213
box-sizing: border-box;
1314
}
1415

16+
.flex {
17+
display: flex;
18+
}
19+
1520
body {
1621
font-family: 'Raleway', sans-serif;
1722
background-color: $base-color;
@@ -22,17 +27,16 @@ body {
2227

2328
p {
2429
font-size: 1.4em;
25-
font-weight: lighter;
2630
text-align: center;
27-
margin: 20px 20px;
2831
padding: 10px;
2932
letter-spacing: .1em;
3033
}
3134

3235
li {
33-
display: block;
3436
list-style-type: none;
3537
font-size: 1.2em;
38+
letter-spacing: 1px;
39+
font-weight: bold;
3640
background-color: $main-text;
3741
margin: 5px 10px;
3842
padding: 20px;
@@ -43,142 +47,147 @@ li {
4347
h1 {
4448
text-align: center;
4549
font-size: 2em;
46-
margin: 0;
4750
color: $main-text;
48-
background-color: $base-color;
49-
5051
}
5152

5253
h2 {
54+
flex-basis: 100%;
5355
font-size: 2em;
5456
text-align: center;
55-
color: $main-text;
57+
text-transform: uppercase;
5658
}
59+
5760
h3 {
5861
font-size: 2em;
5962
text-align: center;
63+
letter-spacing: .1em;
6064
color: grey;
6165
}
6266

6367
ul {
6468
margin: 0;
65-
width: 100%;
6669
padding-left: 0;
67-
6870
}
6971

7072
footer {
73+
justify-content: space-between;
74+
align-items: center;
7175
border-top: solid $main-text 2px;
72-
bottom: 0;
7376
padding: 20px;
74-
width: 100%;
7577
height: 100px;
7678
}
7779

78-
/*Link Styles*/
79-
a {
80+
/*-----LINK STYLES-----*/
81+
82+
a {
83+
color: $mobile-link;
8084
text-decoration: none;
8185
padding: 10px;
8286
text-transform: uppercase;
8387
}
88+
8489
a:hover {
8590
background-image: linear-gradient(to left, violet, indigo, blue, green, yellow, orange, red);
8691
-webkit-background-clip: text;
8792
background-clip: text;
8893
-webkit-text-fill-color: transparent;
89-
9094
}
9195

9296
a:visited {
93-
color: #000;
97+
color: rgb(224, 209, 68);
9498
}
9599

96100
.top a {
101+
font-weight: 600;
97102
font-size: 1rem;
98103
}
104+
99105
/* ===== Base Layout Styles=====*/
100106

101-
/*Header and Main Navigation*/
107+
/*-----HEADER/MAIN NAV------*/
108+
109+
.main-header {
110+
flex-direction: column;
111+
margin: 10px;
112+
}
113+
114+
.main-nav ul{
115+
flex-direction: column;
116+
}
117+
118+
/*-----INTRO------*/
119+
102120
.intro-img {
103-
display: block;
104-
margin: 0;
105-
width: 100%;
106121
padding: 70px;
107122
border-radius: 50%;
108123
}
109124

110125
.intro {
111-
margin: 0 20px 20px 20px;
112-
126+
flex-direction: column;
127+
margin: 10px;
113128
}
114129

115-
.name {
116-
margin: 20px;
117-
118-
}
130+
/*-----STYLED NAME-----*/
119131

120132
.name, .footer-name {
121133
font-family: 'Caveat', cursive;
122134
color:#f7dbf0;
123-
font-size: 2em;
135+
font-size: 40px;
136+
margin: 20px;
124137
}
125138

139+
/*-----PORTFOLIO-----*/
140+
126141
.headergrey {
127142
color: grey;
128143
text-transform: uppercase;
129-
130144
}
131145

132146
.col p {
133147
color: #000;
134-
135-
}
136-
.portfolio-img {
137-
max-width: 100%;
138-
display: block;
139-
margin: auto;
140-
padding: 10px;
141-
142-
}
143-
144-
.portfolio-img:hover {
145-
opacity: 0.5;
146-
147148
}
148149

149150
.portfolio {
150-
width: 100%;
151+
flex-direction: column;
151152
background-color: $portfolio-bg;
152-
padding: 50px 0;
153-
}
153+
padding: 50px 15px;
154154

155-
.nav li{
156-
display: block;
157-
margin-top: 5px;
158-
padding: 10px;
159-
text-align: center;
155+
img {
156+
display: block;
157+
max-width: 100%;
158+
padding: 10px;
159+
160+
&:hover {
161+
opacity: 0.5;
162+
transition: ease-in .5s;
163+
}
164+
}
160165
}
161166

162-
167+
/*-----SKILLS/CONTACT------*/
163168

164-
.skills li {
165-
background-color: $base-color;
169+
.skills,
170+
.contact {
171+
flex-direction: column;
172+
padding: 10px;
166173

174+
ul {
175+
flex-direction: column;
176+
}
167177

178+
li {
179+
background: none;
180+
}
168181
}
169-
.footer-name {
170-
background-color: $base-color;
171-
margin: auto;
172-
float: left;
173-
}
174182

175-
.top{
176-
background-color: $base-color;
177-
margin: auto;
178-
float: right;
183+
/*-----FOOTER------*/
184+
185+
.footer-nav a {
186+
color: $main-text;
179187
}
180188

181-
/*Footer Navigation*/
182-
.bottom {
189+
/*-----HIDES FOOTER NAV ON MOBILE-----*/
190+
191+
.footer-nav {
183192
display: none;
184193
}

0 commit comments

Comments
 (0)