UNPKG

2.36 kBJavaScriptView Raw
1export var HighContrastSelector = '@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)';
2export var HighContrastSelectorWhite =
3// eslint-disable-next-line @fluentui/max-len
4'@media screen and (-ms-high-contrast: black-on-white), screen and (forced-colors: active) and (prefers-color-scheme: light)';
5export var HighContrastSelectorBlack =
6// eslint-disable-next-line @fluentui/max-len
7'@media screen and (-ms-high-contrast: white-on-black), screen and (forced-colors: active) and (prefers-color-scheme: dark)';
8/**
9 * @deprecated Use `HighContrastSelector`
10 */
11export var EdgeChromiumHighContrastSelector = '@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)';
12export var ScreenWidthMinSmall = 320;
13export var ScreenWidthMinMedium = 480;
14export var ScreenWidthMinLarge = 640;
15export var ScreenWidthMinXLarge = 1024;
16export var ScreenWidthMinXXLarge = 1366;
17export var ScreenWidthMinXXXLarge = 1920;
18export var ScreenWidthMaxSmall = ScreenWidthMinMedium - 1;
19export var ScreenWidthMaxMedium = ScreenWidthMinLarge - 1;
20export var ScreenWidthMaxLarge = ScreenWidthMinXLarge - 1;
21export var ScreenWidthMaxXLarge = ScreenWidthMinXXLarge - 1;
22export var ScreenWidthMaxXXLarge = ScreenWidthMinXXXLarge - 1;
23export var ScreenWidthMinUhfMobile = 768;
24export function getScreenSelector(min, max) {
25 var minSelector = typeof min === 'number' ? " and (min-width: " + min + "px)" : '';
26 var maxSelector = typeof max === 'number' ? " and (max-width: " + max + "px)" : '';
27 return "@media only screen" + minSelector + maxSelector;
28}
29/**
30 * The style which turns off high contrast adjustment in browsers.
31 */
32export function getHighContrastNoAdjustStyle() {
33 return {
34 forcedColorAdjust: 'none',
35 MsHighContrastAdjust: 'none',
36 };
37}
38/**
39 * The style which turns off high contrast adjustment in (only) Edge Chromium browser.
40 * @deprecated Use `getHighContrastNoAdjustStyle`
41 */
42// eslint-disable-next-line deprecation/deprecation
43export function getEdgeChromiumNoHighContrastAdjustSelector() {
44 var _a;
45 return _a = {},
46 // eslint-disable-next-line deprecation/deprecation
47 _a[EdgeChromiumHighContrastSelector] = {
48 forcedColorAdjust: 'none',
49 MsHighContrastAdjust: 'none',
50 },
51 _a;
52}
53//# sourceMappingURL=CommonStyles.js.map
\No newline at end of file