Skip to content

Commit c22a4eb

Browse files
author
Federico Zivolo
committed
added fallback style when JS is not available for inputs.
1 parent 19d0c1b commit c22a4eb

3 files changed

Lines changed: 20 additions & 13 deletions

File tree

css-compiled/material.css

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -838,19 +838,21 @@ h6,
838838
.radio input[type=radio][disabled] ~ .check {
839839
background-color: rgba(0, 0, 0, 0.84);
840840
}
841-
.form-control-wrapper {
842-
position: relative;
843-
/* active state */
844-
}
845841
.form-control-wrapper .form-control,
846-
.form-control-wrapper .form-control:focus {
842+
.form-control,
843+
.form-control-wrapper .form-control:focus,
844+
.form-control:focus {
847845
float: none;
848846
border: 0;
849847
box-shadow: none;
850848
border-radius: 0;
851849
background: transparent;
852850
border-bottom: 1px solid #757575;
853851
}
852+
.form-control-wrapper {
853+
position: relative;
854+
/* active state */
855+
}
854856
.form-control-wrapper .form-control:focus {
855857
outline: none;
856858
}
@@ -1707,7 +1709,8 @@ fieldset[disabled] .navbar .btn-link:hover,
17071709
fieldset[disabled] .navbar .btn-link:focus {
17081710
color: #e5e5e5;
17091711
}
1710-
.navbar .navbar-form .form-control-wrapper .form-control {
1712+
.navbar .navbar-form .form-control-wrapper .form-control,
1713+
.navbar .navbar-form .form-control {
17111714
border-color: rgba(255, 255, 255, 0.84);
17121715
color: rgba(255, 255, 255, 0.84);
17131716
}

less/inputs.less

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
// main: material.less
22

3-
.form-control-wrapper {
4-
position: relative;
5-
.form-control, .form-control:focus {
3+
.form-control-wrapper .form-control, .form-control {
4+
&, &:focus {
65
float: none;
76
border: 0;
87
box-shadow: none;
98
border-radius: 0;
109
background: transparent;
1110
border-bottom: 1px solid #757575;
1211
}
12+
}
13+
14+
.form-control-wrapper {
15+
position: relative;
16+
1317
.form-control:focus {
1418
outline: none;
1519
}

less/navbar.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@
140140
}
141141

142142
.navbar-form {
143+
.form-control-wrapper .form-control, .form-control {
144+
border-color: @navbar-border;
145+
color: @navbar-border;
146+
}
143147
.form-control-wrapper {
144-
.form-control {
145-
border-color: @navbar-border;
146-
color: @navbar-border;
147-
}
148148
.material-input:before, input:focus ~ .material-input:after {
149149
background-color: @navbar-border;
150150
}

0 commit comments

Comments
 (0)