File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed
packages/mgt-components/src Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,6 @@ mgt-login .login-button {
6060 border-radius : 4px ;
6161 }
6262
63- & :focus {
64- outline : 0 ;
65- }
66-
6763 & :disabled {
6864 opacity : 0.4 ;
6965 pointer-events : none ;
@@ -74,7 +70,7 @@ mgt-login .login-button {
7470 }
7571
7672 & :focus-visible {
77- outline : auto ;
73+ outline-style : $focus-ring-style ;
7874 }
7975}
8076
Original file line number Diff line number Diff line change 55 * -------------------------------------------------------------------------------------------
66 */
77
8+ $focus-ring-style : var (--focus-ring-style , auto );
9+
810:host ([hidden ]) {
911 display : none ;
1012}
1719 --theme-primary-color : #0078d7 ;
1820 --theme-dark-color : #005a9e ;
1921}
20-
22+ :focus-visible {
23+ // ensure default is correctly set for Firefox
24+ outline-color : var (--focus-ring-color , Highlight );
25+ // ensure default is set for other browsers
26+ outline-color : var (--focus-ring-color , -webkit-focus-ring-color );
27+ // set the style of the focus ring
28+ // this needs to be something other than auto in Firefox to use the custom color
29+ outline-style : $focus-ring-style ;
30+ }
2131.ms-Icon {
2232 display : inline-block ;
2333 font-family : ' FabricMDL2Icons' ;
Original file line number Diff line number Diff line change @@ -166,10 +166,10 @@ export const cache = () => html`
166166 </ script >
167167` ;
168168export const theme = ( ) => html `
169- < div class ="mgt-light ">
169+ < div class ="mgt-light root ">
170170 < header class ="mgt-dark ">
171171 < p > I should be dark, regional class</ p >
172- < mgt-teams-channel- picker > </ mgt-teams-channel -picker >
172+ < mgt-people- picker > </ mgt-people -picker >
173173 < div class ="mgt-light ">
174174 < p > I should be light, second level regional class</ p >
175175 < mgt-teams-channel-picker > </ mgt-teams-channel-picker >
@@ -187,6 +187,10 @@ export const theme = () => html`
187187 < mgt-teams-channel-picker class ="mgt-foo "> </ mgt-teams-channel-picker >
188188 </ div >
189189 < style >
190+ .root {
191+ --focus-ring-color : red;
192+ --focus-ring-style : solid;
193+ }
190194 .custom1 {
191195 --input-border : 2px solid teal;
192196 --input-background-color : # 33c2c2 ;
You can’t perform that action at this time.
0 commit comments