From ca88c377f918a9178c56e206b7bb13baefd30c91 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 25 Mar 2017 13:13:28 +0100 Subject: accidentally committed minionlivesmatter changes to meta --- templates/assets/jquery/src/css/var/cssExpand.js | 3 +++ templates/assets/jquery/src/css/var/getStyles.js | 15 +++++++++++++++ templates/assets/jquery/src/css/var/isHidden.js | 16 ++++++++++++++++ templates/assets/jquery/src/css/var/rmargin.js | 3 +++ templates/assets/jquery/src/css/var/rnumnonpx.js | 5 +++++ templates/assets/jquery/src/css/var/swap.js | 24 ++++++++++++++++++++++++ 6 files changed, 66 insertions(+) create mode 100644 templates/assets/jquery/src/css/var/cssExpand.js create mode 100644 templates/assets/jquery/src/css/var/getStyles.js create mode 100644 templates/assets/jquery/src/css/var/isHidden.js create mode 100644 templates/assets/jquery/src/css/var/rmargin.js create mode 100644 templates/assets/jquery/src/css/var/rnumnonpx.js create mode 100644 templates/assets/jquery/src/css/var/swap.js (limited to 'templates/assets/jquery/src/css') diff --git a/templates/assets/jquery/src/css/var/cssExpand.js b/templates/assets/jquery/src/css/var/cssExpand.js new file mode 100644 index 0000000..9f8194d --- /dev/null +++ b/templates/assets/jquery/src/css/var/cssExpand.js @@ -0,0 +1,3 @@ +define( function() { + return [ "Top", "Right", "Bottom", "Left" ]; +} ); diff --git a/templates/assets/jquery/src/css/var/getStyles.js b/templates/assets/jquery/src/css/var/getStyles.js new file mode 100644 index 0000000..02a4b81 --- /dev/null +++ b/templates/assets/jquery/src/css/var/getStyles.js @@ -0,0 +1,15 @@ +define( function() { + return function( elem ) { + + // Support: IE<=11+, Firefox<=30+ (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; +} ); diff --git a/templates/assets/jquery/src/css/var/isHidden.js b/templates/assets/jquery/src/css/var/isHidden.js new file mode 100644 index 0000000..7997eff --- /dev/null +++ b/templates/assets/jquery/src/css/var/isHidden.js @@ -0,0 +1,16 @@ +define( [ + "../../core", + "../../selector" + + // css is assumed +], function( jQuery ) { + + return function( elem, el ) { + + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || + !jQuery.contains( elem.ownerDocument, elem ); + }; +} ); diff --git a/templates/assets/jquery/src/css/var/rmargin.js b/templates/assets/jquery/src/css/var/rmargin.js new file mode 100644 index 0000000..9be2212 --- /dev/null +++ b/templates/assets/jquery/src/css/var/rmargin.js @@ -0,0 +1,3 @@ +define( function() { + return ( /^margin/ ); +} ); diff --git a/templates/assets/jquery/src/css/var/rnumnonpx.js b/templates/assets/jquery/src/css/var/rnumnonpx.js new file mode 100644 index 0000000..ed13f0b --- /dev/null +++ b/templates/assets/jquery/src/css/var/rnumnonpx.js @@ -0,0 +1,5 @@ +define( [ + "../../var/pnum" +], function( pnum ) { + return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); +} ); diff --git a/templates/assets/jquery/src/css/var/swap.js b/templates/assets/jquery/src/css/var/swap.js new file mode 100644 index 0000000..b6d3b67 --- /dev/null +++ b/templates/assets/jquery/src/css/var/swap.js @@ -0,0 +1,24 @@ +define( function() { + +// A method for quickly swapping in/out CSS properties to get correct calculations. +return function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + +} ); -- cgit v1.3.1