diff --git a/res/css/views/elements/_Field.scss b/res/css/views/elements/_Field.scss index 02f0e548fb..5d5357da39 100644 --- a/res/css/views/elements/_Field.scss +++ b/res/css/views/elements/_Field.scss @@ -19,6 +19,9 @@ limitations under the License. .mx_Field { position: relative; margin: 1em 0; + border-radius: 4px; + transition: border-color 0.25s; + border: 1px solid $input-border-color; } .mx_Field input, @@ -27,9 +30,10 @@ limitations under the License. font-weight: normal; font-family: $font-family; font-size: 14px; + border: none; + // Even without a border here, we still need this avoid overlapping the rounded + // corners on the field above. border-radius: 4px; - transition: border-color 0.25s; - border: 1px solid $input-border-color; padding: 8px 9px; color: $primary-fg-color; background-color: $primary-bg-color; @@ -55,11 +59,14 @@ limitations under the License. pointer-events: none; } +.mx_Field:focus-within { + border-color: $input-focused-border-color; +} + .mx_Field input:focus, .mx_Field select:focus, .mx_Field textarea:focus { outline: 0; - border-color: $input-focused-border-color; } .mx_Field input::placeholder,