Skip to content

Commit

Permalink
Added support of CSS counters. Relates to #126
Browse files Browse the repository at this point in the history
  • Loading branch information
NeXTs committed Nov 3, 2017
1 parent 569c029 commit 0db86da
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
3 changes: 2 additions & 1 deletion clusterize.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
* Outline removes default browser's borders for focused elements.
*/
.clusterize-content{
outline: 0;
outline: 0;
counter-reset: clusterize-counter;
}

/* Centering message that appears when no data provided
Expand Down
3 changes: 2 additions & 1 deletion clusterize.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Clusterize.js - v0.17.6 - 2017-03-05
/*! Clusterize.js - v0.18.0 - 2017-11-04
* http://NeXTs.github.com/Clusterize.js/
* Copyright (c) 2015 Denis Lukov; Licensed GPLv3 */

Expand Down Expand Up @@ -275,6 +275,7 @@
callbacks.clusterWillChange && callbacks.clusterWillChange();
this.html(layout.join(''));
this.options.content_tag == 'ol' && this.content_elem.setAttribute('start', data.rows_above);
this.content_elem.style['counter-increment'] = 'clusterize-counter ' + (data.rows_above-1);
callbacks.clusterChanged && callbacks.clusterChanged();
} else if(only_bottom_offset_changed) {
this.content_elem.lastChild.style.height = data.bottom_offset + 'px';
Expand Down
16 changes: 9 additions & 7 deletions clusterize.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clusterize.js",
"version": "0.17.6",
"version": "0.18.0",
"description": "Tiny vanilla JS plugin to display large data sets easily",
"main": "clusterize.js",
"style": "clusterize.css",
Expand Down

0 comments on commit 0db86da

Please sign in to comment.