minmaxpos-polyfill
v1.0.0
Published
Adds min-left, max-left, min-right, max-right, min-top, max-top, min-bottom and max-bottom properties to CSS.
Downloads
2
Readme
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