2019-01-20 05:11:20 +01:00
|
|
|
/*
|
|
|
|
Copyright 2019 New Vector Ltd
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* TODO: Consider unifying with general input styles in _dharma.scss */
|
|
|
|
|
|
|
|
.mx_Field {
|
|
|
|
position: relative;
|
|
|
|
margin: 1em 0;
|
|
|
|
}
|
|
|
|
|
2019-01-23 03:25:09 +01:00
|
|
|
.mx_Field input,
|
|
|
|
.mx_Field select {
|
2019-01-20 05:11:20 +01:00
|
|
|
font-weight: normal;
|
|
|
|
border-radius: 4px;
|
|
|
|
transition: border-color 0.25s;
|
|
|
|
border: 1px solid $input-border-color;
|
2019-01-21 17:16:20 +01:00
|
|
|
padding: 8px 9px;
|
2019-01-20 05:11:20 +01:00
|
|
|
}
|
|
|
|
|
2019-01-23 03:25:09 +01:00
|
|
|
.mx_Field input:focus,
|
|
|
|
.mx_Field select:focus {
|
2019-01-20 05:11:20 +01:00
|
|
|
outline: 0;
|
2019-01-21 17:24:04 +01:00
|
|
|
border-color: $input-focused-border-color;
|
2019-01-20 05:11:20 +01:00
|
|
|
}
|
|
|
|
|
2019-01-23 04:03:59 +01:00
|
|
|
.mx_Field input::placeholder {
|
2019-01-20 05:11:20 +01:00
|
|
|
transition: color 0.25s ease-in 0s;
|
|
|
|
color: transparent;
|
|
|
|
}
|
|
|
|
|
2019-01-23 04:03:59 +01:00
|
|
|
.mx_Field input:placeholder-shown:focus::placeholder {
|
2019-01-20 05:11:20 +01:00
|
|
|
transition: color 0.25s ease-in 0.1s;
|
|
|
|
color: $greyed-fg-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_Field label {
|
|
|
|
transition:
|
|
|
|
font-size 0.25s ease-out 0.1s,
|
|
|
|
color 0.25s ease-out 0.1s,
|
|
|
|
top 0.25s ease-out 0.1s,
|
|
|
|
background-color 0.25s ease-out 0.1s;
|
|
|
|
color: $primary-fg-color;
|
|
|
|
background-color: transparent;
|
|
|
|
font-size: 14px;
|
|
|
|
position: absolute;
|
|
|
|
left: 0px;
|
|
|
|
top: 0px;
|
2019-01-21 17:09:33 +01:00
|
|
|
margin: 7px 8px;
|
2019-01-20 05:11:20 +01:00
|
|
|
padding: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_Field input:focus + label,
|
2019-01-23 03:25:09 +01:00
|
|
|
.mx_Field input:not(:placeholder-shown) + label,
|
2019-01-23 04:03:59 +01:00
|
|
|
.mx_Field select:focus + label {
|
2019-01-20 05:11:20 +01:00
|
|
|
transition:
|
|
|
|
font-size 0.25s ease-out 0s,
|
|
|
|
color 0.25s ease-out 0s,
|
|
|
|
top 0.25s ease-out 0s,
|
|
|
|
background-color 0.25s ease-out 0s;
|
|
|
|
font-size: 10px;
|
|
|
|
top: -14px;
|
|
|
|
background-color: $field-focused-label-bg-color;
|
|
|
|
}
|
|
|
|
|
2019-01-23 03:25:09 +01:00
|
|
|
.mx_Field input:focus + label,
|
|
|
|
.mx_Field select:focus + label {
|
2019-01-21 17:24:04 +01:00
|
|
|
color: $input-focused-border-color;
|
2019-01-20 05:11:20 +01:00
|
|
|
}
|