Skip to content

Commit ab812aa

Browse files
authored
[UI Framework] Fix appearance of some form components in Firefox (#11589) (#11603)
* Hide dotted line around focused select component in Firefox. * Use correct font-family for TextArea component in Firefox. * Fix gray background of StaticInput in Firefox.
1 parent 1577699 commit ab812aa

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

ui_framework/components/_mixins.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
*/
110110
@mixin formControlBase {
111111
appearance: none;
112+
font-family: $globalFontFamily;
112113
padding: $globalFormControlPadding;
113114
font-size: $globalFontSize;
114115
font-weight: 400;
@@ -160,6 +161,7 @@
160161
/**
161162
* 1. Embedded SVG of fa-caret-down (https://github.com/encharm/Font-Awesome-SVG-PNG/blob/master/black/svg/caret-down.svg).
162163
* 2. Make room on right side for the caret.
164+
* 3. Prevent Firefox from showing dotted line around text on focus.
163165
*/
164166
@mixin select($borderRadius: $globalBorderRadius) {
165167
@include formControl($borderRadius);
@@ -169,6 +171,10 @@
169171
background-repeat: no-repeat;
170172
background-position: calc(100% - 8px); /* 2 */
171173

174+
&:-moz-focusring {
175+
text-shadow: 0 0 0; /* 3 */
176+
}
177+
172178
@include darkTheme {
173179
background-image: url('data:image/svg+xml;utf8,<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1408 704q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z" fill="#CECECE"/></svg>'); /* 1 */
174180
}

ui_framework/components/form/_static_input.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
.kuiStaticInput {
55
@include formControlBase;
66
border: 1px solid transparent; /* 1 */
7+
background-color: transparent;
78
}

ui_framework/dist/ui_framework.css

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
/**
2525
* 1. Embedded SVG of fa-caret-down (https://github.com/encharm/Font-Awesome-SVG-PNG/blob/master/black/svg/caret-down.svg).
2626
* 2. Make room on right side for the caret.
27+
* 3. Prevent Firefox from showing dotted line around text on focus.
2728
*/
2829
/**
2930
* 1. Setting to inline-block guarantees the same height when applied to both
@@ -779,6 +780,7 @@ body {
779780
-webkit-appearance: none;
780781
-moz-appearance: none;
781782
appearance: none;
783+
font-family: "Open Sans", Helvetica, Arial, sans-serif;
782784
padding: 3px 12px 4px;
783785
font-size: 14px;
784786
font-weight: 400;
@@ -819,6 +821,7 @@ body {
819821
-webkit-appearance: none;
820822
-moz-appearance: none;
821823
appearance: none;
824+
font-family: "Open Sans", Helvetica, Arial, sans-serif;
822825
padding: 3px 12px 4px;
823826
font-size: 14px;
824827
font-weight: 400;
@@ -858,6 +861,9 @@ body {
858861
.theme-dark .kuiSelect:focus {
859862
outline: none;
860863
border-color: #6EADC1; }
864+
.kuiSelect:-moz-focusring {
865+
text-shadow: 0 0 0;
866+
/* 3 */ }
861867
.theme-dark .kuiSelect {
862868
background-image: url('data:image/svg+xml;utf8,<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1408 704q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z" fill="#CECECE"/></svg>');
863869
/* 1 */ }
@@ -872,20 +878,23 @@ body {
872878
-webkit-appearance: none;
873879
-moz-appearance: none;
874880
appearance: none;
881+
font-family: "Open Sans", Helvetica, Arial, sans-serif;
875882
padding: 3px 12px 4px;
876883
font-size: 14px;
877884
font-weight: 400;
878885
line-height: 1.5;
879886
color: #191E23;
880887
border: 1px solid transparent;
881-
/* 1 */ }
888+
/* 1 */
889+
background-color: transparent; }
882890
.theme-dark .kuiStaticInput {
883891
color: #cecece; }
884892

885893
.kuiTextArea {
886894
-webkit-appearance: none;
887895
-moz-appearance: none;
888896
appearance: none;
897+
font-family: "Open Sans", Helvetica, Arial, sans-serif;
889898
padding: 3px 12px 4px;
890899
font-size: 14px;
891900
font-weight: 400;
@@ -925,6 +934,7 @@ body {
925934
-webkit-appearance: none;
926935
-moz-appearance: none;
927936
appearance: none;
937+
font-family: "Open Sans", Helvetica, Arial, sans-serif;
928938
padding: 3px 12px 4px;
929939
font-size: 14px;
930940
font-weight: 400;
@@ -1725,6 +1735,7 @@ body {
17251735
-webkit-appearance: none;
17261736
-moz-appearance: none;
17271737
appearance: none;
1738+
font-family: "Open Sans", Helvetica, Arial, sans-serif;
17281739
padding: 3px 12px 4px;
17291740
font-size: 14px;
17301741
font-weight: 400;
@@ -1806,6 +1817,7 @@ body {
18061817
-webkit-appearance: none;
18071818
-moz-appearance: none;
18081819
appearance: none;
1820+
font-family: "Open Sans", Helvetica, Arial, sans-serif;
18091821
padding: 3px 12px 4px;
18101822
font-size: 14px;
18111823
font-weight: 400;
@@ -1848,6 +1860,9 @@ body {
18481860
.theme-dark .kuiLocalSearchSelect:focus {
18491861
outline: none;
18501862
border-color: #6EADC1; }
1863+
.kuiLocalSearchSelect:-moz-focusring {
1864+
text-shadow: 0 0 0;
1865+
/* 3 */ }
18511866
.theme-dark .kuiLocalSearchSelect {
18521867
background-image: url('data:image/svg+xml;utf8,<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1408 704q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z" fill="#CECECE"/></svg>');
18531868
/* 1 */ }

0 commit comments

Comments
 (0)