Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Polymer Web Component that builds vertically ordered columns (timelines) from arbitrary DOM content

License

Notifications You must be signed in to change notification settings

stevenrskelton/ordered-columns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<ordered-columns>

Polymer Web Component that builds vertically ordered columns (timelines) from arbitrary DOM content. Unlike CSS columns, earlier content is always rendered closer to the top of the page than later content.

Both the number of columns and column widths can be preconfigured or changed dynamically using Javascript and window resize events, ensuring elements are always rendered in the correct vertical order.

Unlike other other grid layout libraries such as Masonry, this web component rearranges DOM elements instead of using CSS repositioning. This allows better overall CSS support for styling elements, better support for flex/% based sizing, as well as retaining the ability to use nth-of-type CSS matchers.

Automatic Element Ordering

3 Columns

3 Columns

2 Columns

2 Columns

Documentation

About CSS Columns

DOM Mutations

Template Repeat

CSS Styles

Auto Column Count

Live Examples

NASA Mission Timeline

Halcyon Theme

Usage

  1. Add the library using the Javascript package manager Bower:

    bower install --save ordered-columns

  2. Import Web Components' polyfill:

    <script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
  3. Import Custom Element:

    <link rel="import" href="bower_components/ordered-columns/ordered-columns.html">
  4. Start using it!

    Set the column count, and add content:

    <ordered-columns count="5">
    	<!-- Any number of <article> or elements with role="article" -->
    </ordered-columns>

History

For detailed changelog, check Releases.

License

MIT License © Steven Skelton

About

Polymer Web Component that builds vertically ordered columns (timelines) from arbitrary DOM content

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages