Skip to content

Commit a4af88b

Browse files
authored
Merge pull request #455 from PolymerElements/border-bottom
Implement underlines with border rather than height/width for better rendering at non-standard zoom
2 parents 1d47989 + 1f3f43d commit a4af88b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

paper-input-container.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@
131131
}
132132

133133
.underline {
134+
height: 2px;
134135
position: relative;
135136
}
136137

137138
.focused-line {
138139
@apply(--layout-fit);
139140

140-
background: var(--paper-input-container-focus-color, --primary-color);
141-
height: 2px;
141+
border-bottom: 2px solid var(--paper-input-container-focus-color, --primary-color);
142142

143143
-webkit-transform-origin: center center;
144144
transform-origin: center center;
@@ -158,7 +158,7 @@
158158
}
159159

160160
.underline.is-invalid .focused-line {
161-
background: var(--paper-input-container-invalid-color, --error-color);
161+
border-color: var(--paper-input-container-invalid-color, --error-color);
162162
-webkit-transform: none;
163163
transform: none;
164164
-webkit-transition: -webkit-transform 0.25s;
@@ -170,16 +170,14 @@
170170
.unfocused-line {
171171
@apply(--layout-fit);
172172

173-
background: var(--paper-input-container-color, --secondary-text-color);
174-
height: 1px;
173+
border-bottom: 1px solid var(--paper-input-container-color, --secondary-text-color);
175174

176175
@apply(--paper-input-container-underline);
177176
}
178177

179178
:host([disabled]) .unfocused-line {
180179
border-bottom: 1px dashed;
181180
border-color: var(--paper-input-container-color, --secondary-text-color);
182-
background: transparent;
183181

184182
@apply(--paper-input-container-underline-disabled);
185183
}

0 commit comments

Comments
 (0)