Added basic styling.
This commit is contained in:
parent
29d903d070
commit
90cd3b7a46
3 changed files with 81 additions and 0 deletions
10
css/01-form.css
Normal file
10
css/01-form.css
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
form {
|
||||
--textarea-height: 6em;
|
||||
--label-height: 1.5em;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
padding-top: 2em;
|
||||
padding-bottom: 2em;
|
||||
height: calc(9 * 1.5 * var(--label-height) + var(--textarea-height));
|
||||
}
|
||||
43
css/02-input-textarea-label.css
Normal file
43
css/02-input-textarea-label.css
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
.fieldwrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fieldwrapper label {
|
||||
position: absolute;
|
||||
font-size: 1em;
|
||||
left: 2ch;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.fieldwrapper input:focus ~ label,
|
||||
.fieldwrapper input:not(:placeholder-shown) ~ label,
|
||||
.fieldwrapper textarea:focus ~ label,
|
||||
.fieldwrapper textarea:not(:placeholder-shown) ~ label {
|
||||
left: auto;
|
||||
right: 1ch;
|
||||
top: -.4em;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
width: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
input:invalid, textarea:invalid {
|
||||
box-shadow: 0 0 .2em #f00;
|
||||
}
|
||||
|
||||
input:valid, textarea:valid {
|
||||
box-shadow: 0 0 .2em #0f0;
|
||||
}
|
||||
|
||||
input, img#captcha {
|
||||
height: 2em;
|
||||
}
|
||||
|
||||
textarea {
|
||||
height: var(--textarea-height);
|
||||
}
|
||||
28
css/03-button.css
Normal file
28
css/03-button.css
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
button {
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
/*border: thin solid #333333;
|
||||
background: radial-gradient(#888888, #666666);
|
||||
box-shadow: 1px 2px 1px #333333;*/
|
||||
|
||||
border-radius: 5px;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
color: #FFFFFF;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
|
||||
background: radial-gradient(#00EE00, #00CC00);
|
||||
box-shadow: 1px 2px 1px #006600;
|
||||
border: thin solid #006600;
|
||||
}
|
||||
/*
|
||||
button.green {
|
||||
}
|
||||
|
||||
button.red {
|
||||
background: radial-gradient(#EE0000, #CC0000);
|
||||
box-shadow: 1px 2px 1px #660000;
|
||||
border: thin solid #660000;
|
||||
}
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue