• Resolved Harry Milatz

    (@harry-milatz)


    Hi Jan-Peter,

    at first there is the minified version of shariff.css loaded when “SCRIPT_DEBUG” is true. See line 950 in the shariff.php.

    Next it is not possible to dequeue the css file with “wp_dequeue_style(‘shariffcss’)” or “wp_deregister_style(‘shariffcss’)” to load complete own css (like on my site). The shariff.min.css will always be loaded.

    A third thing is a little “CSS-issue”. You are using <path fill="' . $main_color . '" in the services PHP-files. In your css you overwrite this for example with `.shariff .theme-default .shariff-icon svg path {
    fill: #fff;
    }`
    This CSS “fill” is not W3C valid 😉 And maybe not neccessary, because the “fill” in the “<path” was not in versions before like 4.3.0

    Best regards,
    Harry

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jan-Peter

    (@starguide)

    Hey Harry,

    thanks for taking the time to tell us about the issues.

    1) SCRIPT_DEBUG: Yes, your completely right. No idea how that happened. Must have been a very late night thing. 🙂 Thanks, will be fixed with the next minor release.

    2) You just have to make sure, that you dequeue it AFTER it has been enqueued. The shariff CSS file only gets enqueued on pages that actually have Shariff buttons on them, what usually happens during the the_content filter (sometimes even later, if it is on a widget in the footer or something). The easiest way to remove it for sure is to dequeue it as late as possible, using the wp_footer action. So putting something like this in your functions.php should take care of it:

    /**
     * Dequeues the shariff.min.css to use our own styles.
     */
    function remove_shariff_css() {
    	wp_dequeue_style( 'shariffcss' );
    }
    add_action( 'wp_footer', 'remove_shariff_css' );

    3) The fill is actually necessary for everything to work out of the box for AMP pages. Why should the CSS “fill” not be W3C valid (of course you need to include the SVG specification)? I just checked the Validator again and no warnings or errors are shown for the shariff.min.css: https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Flp42.de%2Fcms%2Fwp-content%2Fplugins%2Fshariff%2Fcss%2Fshariff.min.css&profile=css3svg&usermedium=all&warning=1&vextwarning=&lang=de

    Cheers
    JP

    Thread Starter Harry Milatz

    (@harry-milatz)

    Hi Jan-Peter,

    i know those long nights;)

    Ah ok i see, i did not realized in that moment that the css is load in the footer;) Thanks for the hint.

    Good point with the AMP pages. You are right, i did not include the SVG specifications, so i get a warning.

    Good work!

    Best regards,
    Harry

    Thread Starter Harry Milatz

    (@harry-milatz)

    One more question:
    Why was the “mailform” removed? DSGVO?

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

The topic ‘Some litte “issues”’ is closed to new replies.