• Is it possible to remove all inline CSS injected by jQuery to avoid stuff like this:

    <div id="cookie-law-info-bar" style="display: block; color: rgb(0, 0, 0); font-family: inherit; position: fixed; bottom: 0px; background-color: rgb(255, 255, 255);"><span>
    
        <a href="#" id="cookie_action_close_header" class="medium cli-plugin-button cli-plugin-main-button" style="color: rgb(0, 0, 0); background-color: rgb(0, 0, 0);">...</a>
    
        <a href="" id="" class="cli-plugin-main-link" style="color: rgb(0, 0, 0);">...</a></span>
    </div>
    
    <div id="cookie-law-info-again" style="color: rgb(0, 0, 0); position: fixed; font-family: inherit; bottom: 0px; right: 100px; display: none; background-color: rgb(255, 255, 255);"><span id="cookie_hdr_showagain">Privacy & Cookies Policy</span></div>

    Thank you for your answer.

    https://ww.wp.xz.cn/plugins/cookie-law-info/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    The plugin uses jQuery to add CSS attributes. I do eventually want to change that but doing so is quite fundamental to the plugin and not something you can switch off in the settings, for example. Not something I’m going to have time to do any time soon either, unfortunately.

    Out of interest, why do you wish to avoid the HTML markup being displayed like that?

    Al the best
    Richard

    Thread Starter Macxim

    (@macxim)

    Hi,

    Thank you for your answer.
    I prefer not to have any inline style, at all if possible.

    I prefer having control over the code and style elements in a separate .css/.scss file.

    I think you shouldn’t force people to use those default styles.
    Of course I understand some people don’t want to code anything and just want their cookie law bar and that’s it.
    As you suggest, a checkbox that would switch off the styles and let the user do what they want with it would be perfect.
    I understand this is quite heavy.

    Also, is there any reason about why you are loading the cookie-law-info/js/cookielawinfo.js file in the head instead of before the closing <body> tag?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove inline CSS’ is closed to new replies.