# meow-gallery/trunk/classes/builders/masonry.css.php

Meow Gallery, version trunk. 33 lines.

- Page: https://pluginprobe.com/plugins/meow-gallery/trunk/code/classes/builders/masonry.css.php
- Raw: https://pluginprobe.com/plugins/meow-gallery/trunk/raw/classes/builders/masonry.css.php
- Modified: 2021-08-03T00:11:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/meow-gallery/trunk/code/classes/builders/masonry.css.php#L10-L20`.

```php
<style>

	.mgl-masonry {
		display: <?php echo ($isPreview ? 'block' : 'none') ?>;
	}

	<?php echo esc_attr( $class_id ) ?> {
		column-count: <?php echo (int)$columns ?>;
		margin: <?php echo -1 * ( (int)$gutter / 2 ) ?>px;
	}

	<?php echo esc_attr( $class_id ) ?> .mgl-item {
		padding: <?php echo (int)$gutter / 2 ?>px;
	}

	<?php echo esc_attr( $class_id ) ?> figcaption {
		padding: <?php echo (int)$gutter / 2 ?>px;
	}

	@media screen and (max-width: 800px) {
		<?php echo esc_attr( $class_id ) ?> {
			column-count: 2;
		}
	}

	@media screen and (max-width: 600px) {
		<?php echo esc_attr( $class_id ) ?> {
			column-count: 1;
		}
	}

</style>

```
