Skip to content

Releases: dimitrinicolas/overflow-color

2.3.0 Added data-oc-outside attribute

22 Nov 22:31
Compare
Choose a tag to compare

Add the data-oc-outside attribute to any body's immediate children that you don't want to be included into the data-oc-wrap element at DOM content load.

2.2.0 Force colors update function

22 Nov 14:01
Compare
Choose a tag to compare

The default exported function is now update and check for attribute and scroll change

2.1.5 Performance improvement

25 Oct 13:59
Compare
Choose a tag to compare

Improved performance by passively listening to scroll event

2.1.4 Improved performance

03 Aug 18:17
Compare
Choose a tag to compare

Improved performance by throttling the scroll event listener through requestAnimationFrame.

Now default exporting a force checkScroll function to use when making huge change to the DOM, see Readme for more informations, example:

import checkScroll from 'overflow-color';

/** Change DOM */

checkScroll();

2.1.3 Code simplification

14 May 13:41
Compare
Choose a tag to compare

Some simplifications have been made to the code.

The style tag setting the html background color is now added once to the DOM rather than being removed and recreated for each overflow color change.

2.1.2 Rollup module bundling

11 May 12:16
Compare
Choose a tag to compare

Now bundling into 3 modules using Rollup :

What you need to do

Nothing if you use a module bundler like Webpack or Rollup, by updating overflow-color to 2.1.2, it will automatically choose the most suitable module.

Switching to dist/overflow-color.umd.min.js if you manualy update and embed the library in your webpages : <script src="overflow-color.umd.min.js" async></script.

2.1.1 Async loading possible

10 May 20:11
Compare
Choose a tag to compare

It will now test if document.readyState is equal to interactive, so the script can now be loaded async.

2.1.0 Body attribute shorthand

10 Mar 14:41
Compare
Choose a tag to compare

Added a shortcut data-oc for data-oc-top and data-oc-bottom combined. This new version is backwards-compatible.

For example, this:

<body data-oc-top="red" data-oc-bottom="blue">

can be shortened to:

<body data-oc="red,blue">

2.0.1 Bugfix on Firefox

21 Feb 22:09
Compare
Choose a tag to compare

Bugfix on Firefox

2.0.0 Complete rework

07 Feb 18:39
Compare
Choose a tag to compare

Complete rework and bugfixes. The library is now published on npm.