• Resolved neralex

    (@neralex)


    Hey!

    These wrong placed <style>-sheets in the content()-container inside the <body>-tag bricks the W3C validation rules (<style>-tag is only allowed in <head>) and it is only needed for the fixed masonry-layout. It needs defo another way to load it before the header starts and it makes no sense to show it for each masonry-layout. I modified the following file to show this wrong placed wrong placed <style>-sheets only if the fixed masonry-layout is selected.

    if ($layout == 'fixed') :
    ?>
    <style>
    	#foogallery-gallery-<?php echo $current_foogallery->ID; ?>.masonry-layout-fixed .item {
    		margin-bottom: <?php echo $gutter_width; ?>px;
    		width: <?php echo $width; ?>px;
    	}
    	#foogallery-gallery-<?php echo $current_foogallery->ID; ?>.masonry-layout-fixed .masonry-item-width {
    		width: <?php echo $width; ?>px;
    	}
    
    	#foogallery-gallery-<?php echo $current_foogallery->ID; ?>.masonry-layout-fixed .masonry-gutter-width {
    		width: <?php echo $gutter_width; ?>px;
    	}
    
    	<?php if ( $center_align && 'fixed' === $layout ) { ?>
    	#foogallery-gallery-<?php echo $current_foogallery->ID; ?> {
    		margin: 0 auto;
    	}
    	<?php } ?>
    </style>
    <?php endif;?>

    file: extensions/default-templates/masonry/gallery-masonry.php

    • This topic was modified 9 years, 1 month ago by neralex.
Viewing 1 replies (of 1 total)
  • Plugin Author bradvin

    (@bradvin)

    Hi there,

    Thanks for submitting this. We are busy with a full rewrite of all gallery templates. This rewrite includes the removal of this inline css.

    The new version will be released hopefully before the end of the month.

Viewing 1 replies (of 1 total)

The topic ‘body inline css styles for fixed masonry-layout’ is closed to new replies.