I want to change the styles of ::before psuedo element in WPBakery element shortcode

67 Views Asked by At

So basically, I want to edit the ::before pseudo element. HTML does not allow to add styles to pseudo elements through inline styles. Also adding a style tag inside the element will make the code invalidate according to W3C Validator. Is there a way i can export the variables from this file, or is there any other way i can achieve what i want? Thanks for your help.

<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

function hero_section($attr) {
    extract(
        shortcode_atts(array(
            'main_heading' => '',
            'section_id' => '',
            'content' => '',
            'phone_image' => '',
            'hero_heading_size' => '10',
            'hero_heading_color' => '',
            'hero_circle_gradient_from' => '',
            'hero_circle_gradient_To' => '',
            'hero_circle_drop_shadow' => '',
            'hero_image_drop_shadow' => '',
            'hero_background_color' => ''
        ), $attr)
    );

    ob_start();


?>
 // HTML markup here
<?php
    return ob_get_clean();
}
add_shortcode('hero_section_base', 'hero_section');
?>
0

There are 0 best solutions below