units-css
Version:
Parse length and angle CSS values and convert between units
2 lines • 1.05 kB
JavaScript
/*! @link https://github.com/alexdunphy/viewport, @version 0.1.0, @license MIT */
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):"object"==typeof exports?exports.viewport=n():e.viewport=n()}(this,function(){return function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){e.exports=t(1)},function(e,n){"use strict";var t={},o=-1,i=-1;t.width=function(){return o},t.height=function(){return i},t.max=function(){return Math.max(o,i)},t.min=function(){return Math.min(o,i)},t.setDimensions=function(){o=document.documentElement.clientWidth,i=document.documentElement.clientHeight},t.onWindowResize=function(){t.setDimensions()},"undefined"!=typeof window&&(window.addEventListener("resize",t.onWindowResize,!1),window.addEventListener("orientationchange",t.onWindowResize,!1),t.setDimensions()),e.exports=t}])});