Network Pipe Manufacturer
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

minmaxpos-polyfill

1.0.0 • Public • Published

minmaxpos-polyfill

Adds min-left, max-left, min-right, max-right, min-top, max-top, min-bottom and max-bottom properties to CSS.

By Florian Eckerstorfer for Kiweno.

Install

npm install minmaxpos-polyfill --save

Usage

First, include polyfill and [minmaxpos-polyfill] in your site

<script src="node_modules/polyfill/dist/polyfill.js"></script>
<script src="node_modules/minmaxpos-polyfill/dist/minmaxpos.polyfill.js"></script>
 
<script>
    window.onload = MinMaxPosPolyfill;
</script> 

Then you can use the new properties in yours CSS:

.element {
    left: calc(10% - 100px);
    min-left: 0;
}

If calc() returns a negative value, the element will be position at left: 0px.

Changelog

Version 1.0.0 (4 August 2016)

  • Initial release

Keywords

none

install

npm i minmaxpos-polyfill

Downloadsweekly downloads

3

version

1.0.0

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability