This repository was archived by the owner on Dec 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555 urls : / ( u r l \( ) [ ' " ] ? ( [ ^ \/ \) ' " ] [ ^ : \) ' " ] + ) [ ' " ] ? ( \) ) / g,
5656 findStyles : / @ m e d i a * ( [ ^ \{ ] + ) \{ ( [ \S \s ] + ?) $ / ,
5757 only : / ( o n l y \s + ) ? ( [ a - z A - Z ] + ) \s ? / ,
58- minw : / \( m i n \- w i d t h \s * : [ \s ] * ( [ \s ] * [ 0 - 9 \. ] + ) ( p x | e m ) [ \s ] * \) / ,
59- maxw : / \( m a x \- w i d t h \s * : [ \s ] * ( [ \s ] * [ 0 - 9 \. ] + ) ( p x | e m ) [ \s ] * \) /
58+ minw : / \( [ \s ] * m i n \- w i d t h \s * : [ \s ] * ( [ \s ] * [ 0 - 9 \. ] + ) ( p x | e m ) [ \s ] * \) / ,
59+ maxw : / \( [ \s ] * m a x \- w i d t h \s * : [ \s ] * ( [ \s ] * [ 0 - 9 \. ] + ) ( p x | e m ) [ \s ] * \) /
6060 } ;
6161
6262 //expose media query support flag for external use
Original file line number Diff line number Diff line change @@ -166,6 +166,18 @@ window.onload = function(){
166166 } ) ;
167167 } ) ;
168168 } ) ;
169+
170+ test ( 'Test spaces around min-width/max-width' , function ( ) {
171+ ok ( '@media only screen and (min-width: 1px) { }' . match ( respond . regex . maxw ) === null ) ;
172+ ok ( '@media only screen and ( min-width: 1px ) { }' . match ( respond . regex . maxw ) === null ) ;
173+ ok ( '@media only screen and (min-width: 1px) { }' . match ( respond . regex . minw ) . length ) ;
174+ ok ( '@media only screen and ( min-width: 1px ) { }' . match ( respond . regex . minw ) . length ) ;
175+
176+ ok ( '@media only screen and (max-width: 1280px) { }' . match ( respond . regex . minw ) === null ) ;
177+ ok ( '@media only screen and ( max-width: 1280px ) { }' . match ( respond . regex . minw ) === null ) ;
178+ ok ( '@media only screen and (max-width: 1280px) { }' . match ( respond . regex . maxw ) . length ) ;
179+ ok ( '@media only screen and ( max-width: 1280px ) { }' . match ( respond . regex . maxw ) . length ) ;
180+ } ) ;
169181 }
170182
171183} ;
You can’t perform that action at this time.
0 commit comments