File tree Expand file tree Collapse file tree 4 files changed +7
-28
lines changed
Expand file tree Collapse file tree 4 files changed +7
-28
lines changed Original file line number Diff line number Diff line change 9898 transform : scale (0.5 );
9999
100100 // Allow the selected button to be seen in Windows HCM for IE/Edge
101- @media screen and (-ms-high-contrast : active ) {
102- // Utilize a system color variable to accommodate any user HCM theme
103- background-color : WindowText ;
104- }
105-
106- // Firefox only HCM solution
107- @media screen and (prefers-contrast ) {
108- // Utilize a system color variable to accommodate any user HCM theme
109- border : 2px solid WindowText ;
110- }
101+ @include high-contrast-mode (' icon-fill' );
111102 }
112103 }
113104
Original file line number Diff line number Diff line change 252252 }
253253}
254254
255- /// Windows HCM Mixin
255+ /// High Contrast Mode mixin for Windows and macOS
256256/// @access public
257257/// @example @include high-contrast-mode;
258258/// @group global-helpers
259259/// We should set HCM styles at the end of each file to ensure they are not overridden
260260@mixin high-contrast-mode ($type : ' ' ) {
261- @media screen and (-ms-high-contrast : active ),
262- (forced-colors : active ),
263- (prefers-contrast ) {
261+ @media screen and (-ms-high-contrast : active ), (forced-colors : active ) {
264262 @if ($type == ' icon-fill' ) {
265263 fill : ButtonText ;
266264 }
Original file line number Diff line number Diff line change 1515@use ' ../../utilities/focus-outline' as * ;
1616@use ' ../../utilities/component-reset' as * ;
1717@use ' ../../utilities/visually-hidden' as * ;
18+ @use ' ../../utilities/high-contrast-mode' as * ;
1819@use ' ../../utilities/skeleton' as * ;
1920@use ' ../../utilities/convert' as * ;
2021@use ' ../../config' as * ;
@@ -109,16 +110,7 @@ $radio-border-width: 1px !default;
109110 transform : scale (0.5 );
110111
111112 // Allow the selected button to be seen in Windows HCM for IE/Edge
112- @media screen and (-ms-high-contrast : active ) {
113- // Utilize a system color variable to accommodate any user HCM theme
114- background-color : WindowText ;
115- }
116-
117- // Firefox only HCM solution
118- @media screen and (prefers-contrast ) {
119- // Utilize a system color variable to accommodate any user HCM theme
120- border : 2px solid WindowText ;
121- }
113+ @include high-contrast-mode (' icon-fill' );
122114 }
123115 }
124116
Original file line number Diff line number Diff line change 55// LICENSE file in the root directory of this source tree.
66//
77
8- /// Windows HCM Mixin
8+ /// High Contrast Mode mixin for Windows and macOS
99/// @access public
1010/// @example @include high-contrast-mode;
1111/// @group utilities
1212/// Set HCM styles at the end of each file to ensure they are not overwritten
1313@mixin high-contrast-mode ($type : ' ' ) {
14- @media screen and (-ms-high-contrast : active ),
15- (forced-colors : active ),
16- (prefers-contrast ) {
14+ @media screen and (-ms-high-contrast : active ), (forced-colors : active ) {
1715 @if ($type == ' icon-fill' ) {
1816 fill : ButtonText ;
1917 }
You can’t perform that action at this time.
0 commit comments