UK Cookie Consent
Cookie consent bar is visible on printed pages, so I tweaked it a bit… (1 post)

  1. LMPogoda
    Posted 12 months ago #


    I like Cookie Consent a lot, but I found recently CSS styles, which control display of the “cookie consent bar” are set for “screen” media only.

    So I tweaked source code a bit like this:

    function catapult_add_cookie_css() {
    /* some lines omitted */
    	echo '
    		<style type="text/css"> // CSS now apply to all the media

    Now, if someone needs too style screen warning and print version, she/he can do it in child styles like this:

    // let’s target screens
    		@media screen {
    			/* necessary CSS */
    		// in print we simply may not want the cookie consent at all, styled or not.
    		@media print {
    			#catapult-cookie-bar {
    				display: none;

    I’m posting it here with a hope you’ll include change like this is never revisions, so I won’t need to tweak the plugin each time you update it… :)



You must log in to post.

About this Plugin

About this Topic