Skip to content

Commit 417d0a2

Browse files
LimarenkoDenisvalorkin
authored andcommitted
feat(timepicker): remove inline styling, #2496 (#2812)
* feat(timepicker): remove inline styling, 2496 * replaced inline-styles to component-scoped styles * refactor(timepicker): change css classes names
1 parent 8e50e66 commit 417d0a2

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/timepicker/timepicker.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<tr>
3333
<!-- hours -->
3434
<td class="form-group" [class.has-error]="invalidHours">
35-
<input type="text" style="width:50px;"
36-
class="form-control text-center"
35+
<input type="text"
36+
class="form-control text-center bs-timepicker-field"
3737
placeholder="HH"
3838
maxlength="2"
3939
[readonly]="readonlyInput"
@@ -46,8 +46,8 @@
4646
<td>&nbsp;:&nbsp;</td>
4747
<!-- minutes -->
4848
<td class="form-group" [class.has-error]="invalidMinutes">
49-
<input style="width:50px;" type="text"
50-
class="form-control text-center"
49+
<input type="text"
50+
class="form-control text-center bs-timepicker-field"
5151
placeholder="MM"
5252
maxlength="2"
5353
[readonly]="readonlyInput"
@@ -62,8 +62,8 @@
6262
<!-- seconds -->
6363
<td class="form-group" *ngIf="showSeconds"
6464
[class.has-error]="invalidSeconds">
65-
<input style="width:50px;" type="text"
66-
class="form-control text-center"
65+
<input type="text"
66+
class="form-control text-center bs-timepicker-field"
6767
placeholder="SS"
6868
maxlength="2"
6969
[readonly]="readonlyInput"

src/timepicker/timepicker.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export const TIMEPICKER_CONTROL_VALUE_ACCESSOR: any = {
5959
transform: rotate(-135deg);
6060
top: -2px;
6161
}
62+
.bs-timepicker-field{
63+
width: 50px;
64+
}
6265
`],
6366
encapsulation: ViewEncapsulation.None
6467
})

0 commit comments

Comments
 (0)