Initial Commit
This commit is contained in:
33
node_modules/jquery/src/css/isAutoPx.js
generated
vendored
Normal file
33
node_modules/jquery/src/css/isAutoPx.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
var ralphaStart = /^[a-z]/,
|
||||
|
||||
// The regex visualized:
|
||||
//
|
||||
// /----------\
|
||||
// | | /-------\
|
||||
// | / Top \ | | |
|
||||
// /--- Border ---+-| Right |-+---+- Width -+---\
|
||||
// | | Bottom | |
|
||||
// | \ Left / |
|
||||
// | |
|
||||
// | /----------\ |
|
||||
// | /-------------\ | | |- END
|
||||
// | | | | / Top \ | |
|
||||
// | | / Margin \ | | | Right | | |
|
||||
// |---------+-| |-+---+-| Bottom |-+----|
|
||||
// | \ Padding / \ Left / |
|
||||
// BEGIN -| |
|
||||
// | /---------\ |
|
||||
// | | | |
|
||||
// | | / Min \ | / Width \ |
|
||||
// \--------------+-| |-+---| |---/
|
||||
// \ Max / \ Height /
|
||||
rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;
|
||||
|
||||
export function isAutoPx( prop ) {
|
||||
|
||||
// The first test is used to ensure that:
|
||||
// 1. The prop starts with a lowercase letter (as we uppercase it for the second regex).
|
||||
// 2. The prop is not empty.
|
||||
return ralphaStart.test( prop ) &&
|
||||
rautoPx.test( prop[ 0 ].toUpperCase() + prop.slice( 1 ) );
|
||||
}
|
||||
Reference in New Issue
Block a user