UNPKG

@magica11y/prefers-contrast

Version:

Detects user’s preferences for contrast using the 'prefers-contrast' CSS3 level 5 media query.

18 lines (14 loc) 334 B
// @flow const contrastPreferences: {| NO_PREFERENCE: string, MORE: string, LESS: string, CUSTOM: string, |} = Object.freeze({ NO_PREFERENCE: 'no-preference', MORE: 'more', LESS: 'less', CUSTOM: 'custom', }); export type ContrastPreference = $Values<typeof contrastPreferences>; export default contrastPreferences;