Home Forums WoodMart support forum fix erors from validator.w3.org

fix erors from validator.w3.org

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

    Artem Temos
    Keymaster

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

    #334651

    bigdrop
    Participant

    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; }
    #334743

    Artem Temos
    Keymaster

    Hello,

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

    Kind Regards

    #334747

    bigdrop
    Participant

    Please also help me fix the bellow error.

    #334754

    Artem Temos
    Keymaster

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

    #334779

    bigdrop
    Participant

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

    #334788

    Artem Temos
    Keymaster

    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
    Participant

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

    #334851

    Artem Temos
    Keymaster

    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
    Participant

    That worked!

    Thank you!!!

    #334884

    Artem Temos
    Keymaster

    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.