|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
// High contrast (WCAG) // Print CSS to front-end header function dd_high_contrast_dark(){ $text = of_get_option('dd_high_contrast_dark_color_text'); $background = of_get_option('dd_high_contrast_dark_color_background'); $class = 'html.high-contrast-dark'; $hc_dark = '<style id="high-contrast-dark" type="text/css">'. $class .' * {'; $hc_dark .= 'color: '. $text .' !important;'; $hc_dark .= 'background-color: '. $background .' !important;'; $hc_dark .= 'border-color: '. $text .' !important;'; $hc_dark .= 'box-shadow: none !important;'; $hc_dark .= 'text-shadow: none !important;'; $hc_dark .= 'border-radius: 0 !important; }'; $hc_dark .= $class .' a:hover, '. $class .' a:focus, '. $class .' button:focus {text-decoration:underline !important;}'; $hc_dark .= $class .' a {color:'. $text .' !important;}'; $hc_dark .= $class .' button:focus, '. $class .' input:focus, '. $class .' select:focus, '. $class .' textarea:focus, '. $class .' a:focus '; $hc_dark .= '{outline: thin dotted !important;}'; $hc_dark .= $class .' svg * {fill:'. $text .' !important;}'; $hc_dark .= $class .' ::-webkit-input-placeholder {color:'. $text .' !important; opacity: 0.75;}'; $hc_dark .= $class .' ::before {color: '. $text .' !important; background: '. $background .' !important;}'; $hc_dark .= $class .' ::after {color: '. $text .' !important; background: '. $background .' !important;}'; $hc_dark .= $class .' .navbar-toggle .icon-bar {background-color: '. $text .' !important;}'; $hc_dark .= $class .' .fa-adjust {filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);'; $hc_dark .= '-webkit-transform: scale(-1, 1); -ms-transform: scale(-1, 1); transform: scale(-1, 1);}'; $hc_dark .= '</style>'; echo $hc_dark; } if (of_get_option('dd_high_contrast_dark_enable',0)) { // add_action('wp_head', 'dd_high_contrast_dark'); } |
