Skip to content

Commit 999b9cc

Browse files
committed
Refactor: minor rework
1 parent 9fc220c commit 999b9cc

File tree

1 file changed

+80
-69
lines changed

1 file changed

+80
-69
lines changed

css_template.css

+80-69
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@
33
/**
44
* css_template.css
55
*
6-
* Decscription and notes...
6+
* Description and notes...
77
*
88
* Sections
99
* - Variables
10+
* - Base
1011
* - Typography
1112
* - Links
1213
* - Buttons
13-
* - Lists
14-
* - Tables
15-
* - Images
1614
* - Layout
17-
* - Forms
1815
* - Components
19-
* - Cosmetic
2016
* - Utility
2117
* - State
2218
* - Animation
@@ -34,12 +30,11 @@
3430
--heading-color: rgba(40,40,80,.9);
3531
--subheading-color: rgb(0,0,0);
3632
--body-color: rgba(70,70,85,.9);
37-
--minor-color: rgb(200,200,210);
3833
--emphasis-color: rgb(120,120,140);
3934
--emphasis-color-dark: rgb(100,100,120);
4035
}
4136

42-
/* -- Typography ---------------------------------------------------------- */
37+
/* -- Base ---------------------------------------------------------------- */
4338

4439
html {
4540
color: var(--body-color);
@@ -69,6 +64,42 @@ ul {
6964
padding: 0;
7065
}
7166

67+
button {
68+
border: none;
69+
margin: 0;
70+
padding: 0;
71+
width: auto;
72+
overflow: visible;
73+
background: transparent;
74+
color: inherit;
75+
font: inherit;
76+
line-height: normal;
77+
-webkit-font-smoothing: inherit;
78+
-moz-osx-font-smoothing: inherit;
79+
-webkit-appearance: none;
80+
-moz-appearance: none;
81+
outline: none;
82+
text-align: inherit;
83+
cursor: pointer;
84+
}
85+
86+
input,
87+
textarea,
88+
label,
89+
select {
90+
-moz-appearance: none;
91+
-webkit-appearance: none;
92+
appearance: none;
93+
background: none;
94+
border: none;
95+
border-radius: 0;
96+
box-shadow: none;
97+
font-family: inherit;
98+
outline: none;
99+
}
100+
101+
/* -- Typography ---------------------------------------------------------- */
102+
72103
.small-allcaps {
73104
color: var(--heading-color);
74105
font-size: .85rem;
@@ -127,14 +158,12 @@ ul {
127158
}
128159

129160
.btn {
130-
background: none;
131161
border-radius: 2px;
132162
display: inline-block;
133163
font-size: 1rem;
134164
font-weight: 600;
135165
line-height: 1em;
136166
padding: 10px 20px 12px 20px;
137-
text-decoration: none;
138167
}
139168

140169
.btn--dark,
@@ -178,82 +207,71 @@ ul {
178207
background: var(--emphasis-color-dark);
179208
}
180209

181-
/* -- Lists --------------------------------------------------------------- */
182-
183-
/* -- Tables -------------------------------------------------------------- */
184-
185-
/* -- Images -------------------------------------------------------------- */
186-
187210
/* -- Layout -------------------------------------------------------------- */
188211

189-
/* -- Forms --------------------------------------------------------------- */
190-
191-
.subscribe-form {
192-
width: 100%;
193-
}
194-
195-
.subscribe-form__item {
196-
color: var(--emphasis-color);
197-
}
212+
/* -- Components ---------------------------------------------------------- */
198213

199-
.subscribe-form__field {
200-
background: #fff;
201-
border-radius: 4px 0 0 4px;
202-
color: var(--emphasis-color);
203-
font-size: .85rem;
204-
padding: 10px 0;
205-
text-indent: 10px;
206-
width: 65%;
207-
}
214+
/* -- Utility ------------------------------------------------------------- */
208215

209-
.subscribe-form__field:focus {
210-
box-shadow: 0 0 5px rgba(180,180,180,.5);
216+
.center {
217+
display: flex;
218+
align-items: center;
219+
justify-content: center;
211220
}
212221

213-
.subscribe-form__submit {
214-
background: var(--emphasis-color);
215-
border-radius: 0 4px 4px 0;
216-
color: #fff;
217-
cursor: pointer;
218-
font-weight: 600;
219-
padding: 10px 0;
220-
text-indent: 0;
221-
width: 35%;
222-
}
223-
224-
.subscribe-form__submit:focus {
225-
background: var(--emphasis-color-dark);
222+
.nomargin {
223+
margin: 0;
226224
}
227225

228-
/* -- Components ---------------------------------------------------------- */
229-
230-
/* -- Cosmetic ------------------------------------------------------------ */
231-
232226
.gradient-bg {
233227
background: var(--emphasis-color);
234228
background: linear-gradient(to bottom right, var(--emphasis-color-dark), var(--emphasis-color));
235229
}
236230

237-
/* -- Utility ------------------------------------------------------------- */
238-
239-
.u-nomargin {
240-
margin: 0;
231+
.is-hidden {
232+
display: none;
241233
}
242234

243235
/* -- State --------------------------------------------------------------- */
244236

245-
.is-hidden {
246-
display: none;
237+
::-moz-selection {
238+
background: var(--emphasis-color);
239+
color: #fff;
240+
text-shadow: none;
247241
}
248242

249243
::selection {
250244
background: var(--emphasis-color);
251245
color: #fff;
246+
text-shadow: none;
252247
}
253248

254-
::-moz-selection {
255-
background: var(--emphasis-color);
256-
color: #fff;
249+
::-webkit-input-placeholder {
250+
color: #000;
251+
font-style: normal;
252+
font-weight: 400;
253+
opacity: .25;
254+
}
255+
256+
::-moz-placeholder {
257+
color: #000;
258+
font-style: normal;
259+
font-weight: 400;
260+
opacity: .25;
261+
}
262+
263+
:-ms-input-placeholder {
264+
color: #000;
265+
font-style: normal;
266+
font-weight: 400;
267+
opacity: .25;
268+
}
269+
270+
::placeholder {
271+
color: #000;
272+
font-style: normal;
273+
font-weight: 400;
274+
opacity: .25;
257275
}
258276

259277
::-moz-focus-inner {
@@ -279,13 +297,6 @@ ul {
279297

280298
/* -- Hacks --------------------------------------------------------------- */
281299

282-
/* fixes a firefox bug where select menu options appear slightly indented */
283-
@-moz-document url-prefix() {
284-
select {
285-
text-indent: -2px;
286-
}
287-
}
288-
289300
/* In event delegation, prevents child elements from being event.target */
290301
button > * {
291302
pointer-events: none;

0 commit comments

Comments
 (0)