Skip to content

Instantly share code, notes, and snippets.

@mgol
Last active April 23, 2018 16:50
Show Gist options
  • Save mgol/c14fcffb24cf9c2f08eca519f4dabd90 to your computer and use it in GitHub Desktop.
Save mgol/c14fcffb24cf9c2f08eca519f4dabd90 to your computer and use it in GitHub Desktop.
define( function() {
"use strict";
// Regex visualized:
//
// /------------------------------\
// | |
// | /-----------\ |
// | | | |
// | | / top- \ | |
// | / margin- \ | | right- | | | / width \
// |-| border- |-+-| bottom- |-+-|-| |-\
// | \ padding- / \ left- / | \ height / |
// BEGIN -| | |- END
// | / min- \ | |
// |----------------| |-----/ |
// | \ max- / |
// | |
// |------------------ font-size -------------------|
// |--------------------- top ----------------------|
// |-------------------- right ---------------------|
// |-------------------- bottom --------------------|
// \-------------------- left --------------------/
return /(?:(?:(?:(?:margin-|border-|padding-)(?:top-|right-|bottom-|left-)?)|(?:min-|max-))?(?:width|height))|font-size|top|right|bottom|left/;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment