public function custom_css_code(Pojo_Create_CSS_Code $css_code) { $bg_color = get_theme_mod('a11y_toggle_button_bg_color', '#4054b2'); if (!empty($bg_color)) { $css_code->add_value('#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a', 'background-color', $bg_color); $css_code->add_value('#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay, #pojo-a11y-toolbar .pojo-a11y-toolbar-overlay ul.pojo-a11y-toolbar-items.pojo-a11y-links', 'border-color', $bg_color); } }
public function custom_css_code(Pojo_Create_CSS_Code $css_code) { $bg_color = get_theme_mod('a11y_toggle_button_bg_color', '#4054b2'); if (!empty($bg_color)) { $css_code->add_value('#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a', 'background-color', $bg_color); $css_code->add_value('#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay, #pojo-a11y-toolbar .pojo-a11y-toolbar-overlay ul.pojo-a11y-toolbar-items.pojo-a11y-links', 'border-color', $bg_color); } $outline_style = get_theme_mod('a11y_focus_outline_style', 'solid'); if (!empty($outline_style)) { $css_code->add_value('body.pojo-a11y-focusable a:focus', 'outline-style', $outline_style . ' !important'); } $outline_width = get_theme_mod('a11y_focus_outline_width', '1px'); if (!empty($outline_width)) { $css_code->add_value('body.pojo-a11y-focusable a:focus', 'outline-width', $outline_width . ' !important'); } $outline_color = get_theme_mod('a11y_focus_outline_color', '#FF0000'); if (!empty($outline_color)) { $css_code->add_value('body.pojo-a11y-focusable a:focus', 'outline-color', $outline_color . ' !important'); } $distance_top = get_theme_mod('a11y_toolbar_distance_top', '100px'); if (!empty($distance_top)) { $css_code->add_value('#pojo-a11y-toolbar', 'top', $distance_top . ' !important'); } $distance_top_mobile = get_theme_mod('a11y_toolbar_distance_top_mobile', '50px'); if (!empty($distance_top_mobile)) { $css_code->add_data("@media (max-height: 600px) { #pojo-a11y-toolbar { top: {$distance_top_mobile} !important } }"); } }