From 796347e8d94db9ec8622a2c1c7d9c5ddfe6789b1 Mon Sep 17 00:00:00 2001 From: Gilbert Pellegrom Date: Fri, 19 Apr 2019 13:51:44 +0100 Subject: [PATCH] v0.2.2 --- dist/flexmasonry.css | 43 ++++++++++++++++++++++++++++++++++++++++++- dist/flexmasonry.js | 4 ++-- package.json | 2 +- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/dist/flexmasonry.css b/dist/flexmasonry.css index 0df1499..6ec16a2 100644 --- a/dist/flexmasonry.css +++ b/dist/flexmasonry.css @@ -1,6 +1,6 @@ /*! * FlexMasonry - * Version: 0.2.1 + * Version: 0.2.2 * Author: Gilbert Pellegrom * License: MIT */ @@ -67,4 +67,45 @@ width: 0 !important; margin: 0; } +.flexmasonry-cols-2 .flexmasonry-break:nth-child(2n+1) { order: 1; } +.flexmasonry-cols-2 .flexmasonry-break:nth-child(2n) { order: 2; } + +.flexmasonry-cols-3 .flexmasonry-break:nth-child(3n+1) { order: 1; } +.flexmasonry-cols-3 .flexmasonry-break:nth-child(3n+2) { order: 2; } +.flexmasonry-cols-3 .flexmasonry-break:nth-child(3n) { order: 3; } + +.flexmasonry-cols-4 .flexmasonry-break:nth-child(4n+1) { order: 1; } +.flexmasonry-cols-4 .flexmasonry-break:nth-child(4n+2) { order: 2; } +.flexmasonry-cols-4 .flexmasonry-break:nth-child(4n+3) { order: 3; } +.flexmasonry-cols-4 .flexmasonry-break:nth-child(4n) { order: 4; } + +.flexmasonry-cols-5 .flexmasonry-break:nth-child(5n+1) { order: 1; } +.flexmasonry-cols-5 .flexmasonry-break:nth-child(5n+2) { order: 2; } +.flexmasonry-cols-5 .flexmasonry-break:nth-child(5n+3) { order: 3; } +.flexmasonry-cols-5 .flexmasonry-break:nth-child(5n+4) { order: 4; } +.flexmasonry-cols-5 .flexmasonry-break:nth-child(5n) { order: 5; } + +.flexmasonry-cols-6 .flexmasonry-break:nth-child(6n+1) { order: 1; } +.flexmasonry-cols-6 .flexmasonry-break:nth-child(6n+2) { order: 2; } +.flexmasonry-cols-6 .flexmasonry-break:nth-child(6n+3) { order: 3; } +.flexmasonry-cols-6 .flexmasonry-break:nth-child(6n+4) { order: 4; } +.flexmasonry-cols-6 .flexmasonry-break:nth-child(6n+5) { order: 5; } +.flexmasonry-cols-6 .flexmasonry-break:nth-child(6n) { order: 6; } + +.flexmasonry-cols-7 .flexmasonry-break:nth-child(7n+1) { order: 1; } +.flexmasonry-cols-7 .flexmasonry-break:nth-child(7n+2) { order: 2; } +.flexmasonry-cols-7 .flexmasonry-break:nth-child(7n+3) { order: 3; } +.flexmasonry-cols-7 .flexmasonry-break:nth-child(7n+4) { order: 4; } +.flexmasonry-cols-7 .flexmasonry-break:nth-child(7n+5) { order: 5; } +.flexmasonry-cols-7 .flexmasonry-break:nth-child(7n+6) { order: 6; } +.flexmasonry-cols-7 .flexmasonry-break:nth-child(7n) { order: 7; } + +.flexmasonry-cols-8 .flexmasonry-break:nth-child(8n+1) { order: 1; } +.flexmasonry-cols-8 .flexmasonry-break:nth-child(8n+2) { order: 2; } +.flexmasonry-cols-8 .flexmasonry-break:nth-child(8n+3) { order: 3; } +.flexmasonry-cols-8 .flexmasonry-break:nth-child(8n+4) { order: 4; } +.flexmasonry-cols-8 .flexmasonry-break:nth-child(8n+5) { order: 5; } +.flexmasonry-cols-8 .flexmasonry-break:nth-child(8n+6) { order: 6; } +.flexmasonry-cols-8 .flexmasonry-break:nth-child(8n+7) { order: 7; } +.flexmasonry-cols-8 .flexmasonry-break:nth-child(8n) { order: 8; } diff --git a/dist/flexmasonry.js b/dist/flexmasonry.js index 15cbcd3..6f4557f 100644 --- a/dist/flexmasonry.js +++ b/dist/flexmasonry.js @@ -1,7 +1,7 @@ /*! * FlexMasonry - * Version: 0.2.1 + * Version: 0.2.2 * Author: Gilbert Pellegrom * License: MIT */ -var FlexMasonry=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){t(1),e.exports=t(2)},function(e,n,t){},function(e,n,t){"use strict";t.r(n);const r={responsive:!0,breakpointCols:{"min-width: 1500px":6,"min-width: 1200px":5,"min-width: 992px":4,"min-width: 768px":3,"min-width: 576px":2},numCols:4};let o=null,i={},s=[];function a(){s.forEach(function(e){c(e)})}function l(){o&&window.cancelAnimationFrame(o),o=window.requestAnimationFrame(function(){y()})}function c(e){if(d()<2)return void e.style.removeProperty("height");let n=[];Array.from(e.children).forEach(function(e){if(e.classList.contains("flexmasonry-break"))return;const t=window.getComputedStyle(e),r=t.getPropertyValue("order"),o=t.getPropertyValue("height");n[r-1]||(n[r-1]=0),n[r-1]+=Math.ceil(parseFloat(o))});const t=Math.max(...n);e.style.height=t+"px"}function f(e){const n=e.querySelectorAll(".flexmasonry-break");if(Array.from(n).length!==d()-1)for(let n=0;n", "license": "MIT",