diff --git a/Form-Controls/formcontrolchecklist.md b/Form-Controls/formcontrolchecklist.md new file mode 100644 index 00000000..77b3ee85 --- /dev/null +++ b/Form-Controls/formcontrolchecklist.md @@ -0,0 +1,18 @@ +# Developers must test their work + +## Let's write out our testable criteria: + +### HTML +- [X ] I have used **HTML** and **CSS** only. +- [ X] My form is **semantic HTML**. +- [ X] All inputs have associated **labels**. +- [X ] My **Lighthouse Accessibility** score is **100**. +- [ X] I require a **valid name**. I have defined a valid name as a text string of two characters or more. +- [ X] I require a **valid email**. +- [X ] I require one **colour** from a defined set of 3 colours. +- [ X] I require one **size** from a defined set of 6 sizes. +- [ X] I require one **date** from a constrained date range. + +### CSS +- [ X] I show which element is **focused**. +- [ X] My **Lighthouse Accessibility** score is **100**. diff --git a/Form-Controls/index.html b/Form-Controls/index.html index 4344b144..b8c4622a 100644 --- a/Form-Controls/index.html +++ b/Form-Controls/index.html @@ -3,25 +3,66 @@ - My form exercise + T-Shirt Order Form
-

Product Pick

+

T-Shirt Order Form

+

T-Shirt Order Form

+ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
diff --git a/Form-Controls/styles.css b/Form-Controls/styles.css index e69de29b..0c5886e1 100644 --- a/Form-Controls/styles.css +++ b/Form-Controls/styles.css @@ -0,0 +1,56 @@ +html { + font-size: 16px; +} +header h1 { + width: 100vw; + display: flex; + justify-content: center; +} +form { + display: flex; + flex-direction: column; + background: #fff; + padding: 2rem; + border-radius: 0.6rem; + max-width: 50rem; + margin: 0 auto; + box-shadow: 0 0 rgba(0, 0, 0, 0.1); + gap: 1rem; +} +h2 { + text-align: center; +} + +label { + margin-top: 1rem; + font-weight: bold; +} + +input, +select { + padding: 1rem; + margin-top: 0.5rem; + border-radius: 0.5rem; + border: 0.1rem solid #ccc; +} +.button-order { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} +input[type="submit"] { + background-color: #1e7e34; + color: white; + cursor: pointer; + border: none; + /* margin-top: 20px; + width:20vw; */ +} + +input[type="submit"]:hover { + background-color: #218838; +} +input[type="submit"]:focus { + outline: 0.2rem solid black; +}