Skip to content

Commit e16cec0

Browse files
committed
Fix input focus state
1 parent 0b77015 commit e16cec0

File tree

1 file changed

+12
-6
lines changed
  • components/dash-core-components/src/components/css

1 file changed

+12
-6
lines changed

components/dash-core-components/src/components/css/input.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
overflow: hidden;
1616
}
1717

18+
.dash-input-container:focus-within {
19+
outline: 2px solid var(--Dash-Fill-Interactive-Strong);
20+
}
21+
22+
.dash-input-container input:focus {
23+
outline: none;
24+
}
25+
1826
.dash-input-container:has(input[type='range']) {
1927
background: inherit;
2028
}
@@ -37,6 +45,7 @@
3745
/* Hide native steppers for number inputs */
3846
.dash-input-element[type='number'] {
3947
-moz-appearance: textfield;
48+
border-radius: 0;
4049
}
4150

4251
.dash-input-element[type='number']::-webkit-outer-spin-button,
@@ -70,10 +79,11 @@
7079
cursor: pointer;
7180
font-size: 16px;
7281
font-weight: bold;
73-
color: var(--Dash-Text-Primary);
82+
color: var(--Dash -Text-Primary);
7483
}
7584

76-
.dash-input-stepper:hover {
85+
.dash-input-stepper:hover,
86+
.dash-input-stepper:focus {
7787
background: var(--Dash-Fill-Primary-Hover);
7888
}
7989

@@ -115,7 +125,3 @@
115125
input.dash-input-element:invalid {
116126
outline: solid red;
117127
}
118-
119-
input.dash-input-element:valid {
120-
outline: none black;
121-
}

0 commit comments

Comments
 (0)