Home Forums WoodMart – Premium Template fix erors from validator.w3.org

This topic contains 40 replies, has 2 voices, and was last updated by Artem Temos Artem Temos 6 days ago.

Viewing 11 posts - 31 through 41 (of 41 total)
  • Author
    Posts
  • #332553

    Could you please clarify where exactly do you see these errors on your website?

    #334651

    bigdrop
    Customer

    Hi,

    There is this part of the code that causes the error.

    .menu-item-480 .wd-design-sized {min-height: 100px; width: 750px; }
    .menu-item-382 .wd-design-sized {min-height: 100px; width: 750px; }
    .menu-item-479 .wd-design-sized {min-height: 100px; width: 750px; }
    .menu-item-485 .wd-design-sized {min-height: 100px; width: 850px; }
    .menu-item-383 .wd-design-sized {min-height: 100px; width: 920px; }
    .menu-item-489 .wd-design-sized {min-height: 100px; width: 550px; }
    .menu-item-491 .wd-design-sized {min-height: 100px; width: 750px; }
    Private Content Hidden
    • This reply was modified 6 days, 16 hours ago by  bigdrop.
    #334743

    Hello,

    Yes, you are right. We will review this CSS in our next theme update and try to fix.

    Kind Regards

    #334747

    bigdrop
    Customer

    Please also help me fix the bellow error.

    Private Content Hidden
    #334754

    It has been fixed already. We just didn’t upload the fix on our demo.

    #334779

    bigdrop
    Customer

    Is there a documentation for how to create this section?
    If I import this section to my theme it shows errors.

    Private Content Hidden
    #334788

    We are sorry for the inconvenience. This particular fix will be included in our 6.3 update. Try to add the following PHP code snippet to the child theme functions.php file to fix this now

    function woodmart_get_gradient_css( $gradient_attr ) {
    	$gradient_css    = explode( '|', $gradient_attr );
    	$gradient_css[1] = str_replace( array( 'left', 'top', 'right', 'bottom' ), array( 'to left', 'to top', 'to right', 'to bottom' ), $gradient_css[1] );
    	$result          = 'background-image:-webkit-' . $gradient_css[1] . ';';
    	$result         .= 'background-image:' . $gradient_css[1] . ';';
    	return $result;
    }
    #334812

    bigdrop
    Customer

    That code fix the issue on validator but brakes the website.

    Private Content Hidden
    #334851

    Try to replace your code with the following one

    function woodmart_get_gradient_css( $gradient_attr ) {
    	$gradient_css = explode( '|', $gradient_attr );
    	$css          = $gradient_css[1];
    	$webkit_css   = $gradient_css[1];
    
    	if ( strstr( $css, 'left' ) ) {
    		$css = str_replace( 'left', 'to right', $gradient_css[1] );
    	} elseif ( strstr( $css, 'right' ) ) {
    		$css = str_replace( 'right', 'to left', $gradient_css[1] );
    	} elseif ( strstr( $css, 'top' ) ) {
    		$css = str_replace( 'top', 'to bottom', $gradient_css[1] );
    	} elseif ( strstr( $css, 'bottom' ) ) {
    		$css = str_replace( 'bottom', 'to top', $gradient_css[1] );
    	}
    
    	$result  = 'background-image:-webkit-' . $webkit_css . ';';
    	$result .= 'background-image:' . $css . ';';
    	return $result;
    }
    #334864

    bigdrop
    Customer

    That worked!

    Thank you!!!

    #334884

    You are welcome!

Viewing 11 posts - 31 through 41 (of 41 total)

The topic ‘fix erors from validator.w3.org’ is closed to new replies.