Created
July 28, 2016 18:50
-
-
Save milosdjakonovic/d0863620fdb9fbefa46e53926a59991a to your computer and use it in GitHub Desktop.
Regex to match media queries and get values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/@\s*?media\s*?\(\s*?(min|max)-(width|height)\s*?:\s*?(\d+)(px|em)\s*?\)\s*?{(.*)}/gms | |
/** | |
* Only basically tested. | |
* Should match min-max-width-height number px|em and following rules. | |
* Provides capturing groups to determinate condition alongside with css. | |
* | |
* Created with help of regex101 | |
* https://regex101.com/r/zA6fX2/1 | |
* | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you