Skip to content

Commit 62005c6

Browse files
committed
add colour styles
1 parent ef44f77 commit 62005c6

2 files changed

Lines changed: 39 additions & 9 deletions

File tree

Form-Controls/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ <h1>Product Pick</h1>
2525
<div class="form-group">
2626
<!-- Add input for email - required and validate -->
2727
<label for="email">Email</label>
28-
<input type="email" id="email" required>
28+
<input type="email" id="email" placeholder="joe@me.com" required>
2929
</div>
3030
<div class="form-group">
3131
<!-- Drop down list of 3 colours (green, blue, red) - required -->
32-
<label for="colour">Choose a colour:</label>
32+
<label for="colour">Choose colour</label>
3333
<select name="colour" id="colour" required>
3434
<option value="" disabled selected>Select a colour</option>
3535
<option value="red">Red</option>
@@ -40,7 +40,7 @@ <h1>Product Pick</h1>
4040

4141
<div class="form-group">
4242
<!-- Drop down list of 6 sizes (XS, S, M, L, XL, XXL) - required -->
43-
<label for="size">Choose a size:</label>
43+
<label for="size">Choose size</label>
4444
<select name="size" id="size" required>
4545
<option value="" disabled selected>Select a size</option>
4646
<option value="xs">XS</option>

Form-Controls/style.css

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,62 @@
33
margin: 0;
44
}
55

6+
:root {
7+
/* font colours */
8+
--clr-font-base: #DCE1DE;
9+
/* background colours */
10+
--clr-bg-base: #216869;
11+
--clr-bg-accent1: #3B8C88; /* 20% lighter */
12+
--clr-bg-accent2: #55AFAF; /* 40% lighter */
13+
--clr-bg-accent3: #70D2D2; /* 60% lighter */
14+
--clr-bg-dark1: #1A5354; /* 40% darker */
15+
}
16+
617
input,
718
button,
8-
select,
9-
textarea {
19+
select {
1020
font: inherit;
1121
}
1222

13-
input {
23+
label {
24+
text-transform: uppercase;
25+
color: var(--clr-font-base);
26+
font-weight: 500;
27+
}
28+
29+
input, select {
1430
width: 100%;
15-
/* height: 3rem; */
31+
height: 2rem;
32+
background-color: var(--clr-bg-accent2);
1633
}
1734

1835
form button {
36+
text-transform: uppercase;
37+
background-color: var(--clr-bg-accent2);
38+
color: var(--clr-font-base);
39+
font-weight: 500;
1940
margin-top: 1rem;
41+
height: 2.5rem;
42+
border: none;
43+
border-radius: 5px;
2044
grid-column: 1 / -1;
2145
justify-self: center;
2246
width: 100%;
47+
2348
@media(width > 550px) {
2449
width: 50%;
2550
}
2651
}
2752

53+
form button:hover {
54+
background-color: var(--clr-bg-accent3);
55+
}
56+
2857
form {
2958
display: grid;
59+
min-width: 350px;
3060
gap: 1rem;
31-
border: 2px solid green;
61+
background-color: var(--clr-bg-base);
3262
padding: 2rem;
3363
border-radius: 10px;
3464

@@ -49,8 +79,8 @@ form {
4979

5080
body {
5181
font-family: "Poppins", sans-serif;
52-
/* font-weight: 00; */
5382
font-style: normal;
83+
background-color: var(--clr-bg-accent3);
5484
}
5585

5686
main, header, footer {

0 commit comments

Comments
 (0)