Sha256: 4f2df72ff14e830a3dac7c5c259cb566000879796235f50da77ec4e3dfdf6172
Contents?: true
Size: 732 Bytes
Versions: 5
Compression:
Stored size: 732 Bytes
Contents
(function() { "use strict"; // Used with the `has-cards` and `has-columns` Sass mixins, // it appends an extra span element for each missing column // based on the number of columns defined in the CSS. App.register('component').enter(function() { var columns, children, container, missingColumns; $('body *').each(function() { container = $(this); columns = container.css('column-count'); // Ignore elements without column-count if (columns === 'auto') { return; } children = container.children().length; missingColumns = columns - (children % columns); for (var i = 0; i < missingColumns; i++) { container.append('<span></span>'); } }); }); })();
Version data entries
5 entries across 5 versions & 1 rubygems