WIP
This commit is contained in:
parent
e5c28569c6
commit
9d0162e475
11 changed files with 456 additions and 194 deletions
106
src/Input.module.css
Normal file
106
src/Input.module.css
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
.fieldRow {
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
margin: 1em 0;
|
||||
border-radius: 4px;
|
||||
transition: border-color .25s;
|
||||
border: 1px solid #e7e7e7;
|
||||
}
|
||||
|
||||
.fieldRow.rightAlign {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.fieldRow > .field {
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.fieldRow > .field:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.fieldRow > .field:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.field input {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
padding: 8px 9px;
|
||||
color: #2e2f32;
|
||||
background-color: #fff;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.field input::placeholder {
|
||||
transition: color 0.25s ease-in 0s;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.field input:placeholder-shown:focus::placeholder {
|
||||
transition: color .25s ease-in .1s;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.field label {
|
||||
transition: font-size .25s ease-out .1s,color .25s ease-out .1s,top .25s ease-out .1s,background-color .25s ease-out .1s;
|
||||
color: #2e2f32;
|
||||
background-color: transparent;
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
margin: 7px 8px;
|
||||
padding: 2px;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: calc(100% - 20px);
|
||||
}
|
||||
|
||||
.field input:focus + label {
|
||||
background-color: #fff;
|
||||
color: #238cf5;
|
||||
transition: font-size .25s ease-out 0s,color .25s ease-out 0s,top .25s ease-out 0s,background-color .25s ease-out 0s;
|
||||
font-size: 10px;
|
||||
top: -13px;
|
||||
padding: 0 2px;
|
||||
background-color: #fff;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.button {
|
||||
vertical-align: middle;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
background-color: #0dbd8b;
|
||||
width: auto;
|
||||
padding: 7px 15px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
outline: none;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
|
||||
}
|
||||
|
||||
.button:active {
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue