You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 3, 2024. It is now read-only.
ok(eCSStender.matchMedia('screen and (orientation:portrait)')==(O=='portrait'),'(orientation:portrait) '+(O=='portrait' ? 'matched' : 'does not match'));
210
+
ok(eCSStender.matchMedia('screen and (orientation:landscape)')==(O=='landscape'),'(orientation:landscape) '+(O=='landscape' ? 'matched' : 'does not match'));
211
+
212
+
// width
213
+
ok(eCSStender.matchMedia('screen and (width:'+W+'px)'),'width set to window width matches');
214
+
ok(!eCSStender.matchMedia('screen and (width:'+(W-100)+'px)'),'width set to window width - 100 does not match');
215
+
ok(!eCSStender.matchMedia('screen and (width:'+(W+100)+'px)'),'width set to window width + 100 does not match');
216
+
217
+
// max-width
218
+
ok(eCSStender.matchMedia('screen and (max-width:'+W+'px)'),'max-width set to window width matches');
219
+
ok(!eCSStender.matchMedia('screen and (max-width:'+(W-100)+'px)'),'max-width set to window width - 100 does not match');
220
+
ok(eCSStender.matchMedia('screen and (max-width:'+(W+100)+'px)'),'max-width set to window width + 100 matches');
221
+
222
+
// min-width
223
+
ok(eCSStender.matchMedia('screen and (min-width:'+W+'px)'),'min-width set to window width matches');
224
+
ok(eCSStender.matchMedia('screen and (min-width:'+(W-100)+'px)'),'min-width set to window width - 100 matches');
225
+
ok(!eCSStender.matchMedia('screen and (min-width:'+(W+100)+'px)'),'min-width set to window width + 100 does not match');
226
+
227
+
// device-width
228
+
ok(eCSStender.matchMedia('screen and (device-width:'+DW+'px)'),'device-width set to device-width matches');
229
+
ok(!eCSStender.matchMedia('screen and (device-width:'+(DW-100)+'px)'),'device-width set to device-width - 100 does not match');
230
+
ok(!eCSStender.matchMedia('screen and (device-width:'+(DW+100)+'px)'),'device-width set to device-width + 100 does not match');
231
+
232
+
// max-device-width
233
+
ok(eCSStender.matchMedia('screen and (max-device-width:'+DW+'px)'),'max-device-width set to device-width matches');
234
+
ok(!eCSStender.matchMedia('screen and (max-device-width:'+(DW-100)+'px)'),'max-device-width set to device-width - 100 does not match');
235
+
ok(eCSStender.matchMedia('screen and (max-device-width:'+(DW+100)+'px)'),'max-device-width set to device-width + 100 matches');
236
+
237
+
// min-device-width
238
+
ok(eCSStender.matchMedia('screen and (min-device-width:'+DW+'px)'),'min-device-width set to device-width matches');
239
+
ok(eCSStender.matchMedia('screen and (min-device-width:'+(DW-100)+'px)'),'min-device-width set to device-width - 100 matches');
240
+
ok(!eCSStender.matchMedia('screen and (min-device-width:'+(DW+100)+'px)'),'min-device-width set to device-width + 100 does not match');
241
+
242
+
// height
243
+
ok(eCSStender.matchMedia('screen and (height:'+H+'px)'),'height set to window height matches');
244
+
ok(!eCSStender.matchMedia('screen and (height:'+(H-100)+'px)'),'height set to window height - 100 does not match');
245
+
ok(!eCSStender.matchMedia('screen and (height:'+(H+100)+'px)'),'height set to window height + 100 does not match');
246
+
247
+
// max-height
248
+
ok(eCSStender.matchMedia('screen and (max-height:'+H+'px)'),'max-height set to window height matches');
249
+
ok(!eCSStender.matchMedia('screen and (max-height:'+(H-100)+'px)'),'max-height set to window height - 100 does not match');
250
+
ok(eCSStender.matchMedia('screen and (max-height:'+(H+100)+'px)'),'max-height set to window height + 100 matches');
251
+
252
+
// min-height
253
+
ok(eCSStender.matchMedia('screen and (min-height:'+H+'px)'),'min-height set to window height matches');
254
+
ok(eCSStender.matchMedia('screen and (min-height:'+(H-100)+'px)'),'min-height set to window height - 100 matches');
255
+
ok(!eCSStender.matchMedia('screen and (min-height:'+(H+100)+'px)'),'min-height set to window height + 100 does not match');
256
+
257
+
// device-height
258
+
ok(eCSStender.matchMedia('screen and (device-height:'+DH+'px)'),'device-height set to device-height matches');
259
+
ok(!eCSStender.matchMedia('screen and (device-height:'+(DH-100)+'px)'),'device-height set to device-height - 100 does not match');
260
+
ok(!eCSStender.matchMedia('screen and (device-height:'+(DH+100)+'px)'),'device-height set to device-height + 100 does not match');
261
+
262
+
// max-device-height
263
+
ok(eCSStender.matchMedia('screen and (max-device-height:'+DH+'px)'),'max-device-height set to device-height matches');
264
+
ok(!eCSStender.matchMedia('screen and (max-device-height:'+(DH-100)+'px)'),'max-device-height set to device-height - 100 does not match');
265
+
ok(eCSStender.matchMedia('screen and (max-device-height:'+(DH+100)+'px)'),'max-device-height set to device-height + 100 matches');
266
+
267
+
// min-device-height
268
+
ok(eCSStender.matchMedia('screen and (min-device-height:'+DH+'px)'),'min-device-height set to device-height matches');
269
+
ok(eCSStender.matchMedia('screen and (min-device-height:'+(DH-100)+'px)'),'min-device-height set to device-height - 100 matches');
270
+
ok(!eCSStender.matchMedia('screen and (min-device-height:'+(DH+100)+'px)'),'min-device-height set to device-height + 100 does not match');
271
+
272
+
// complex rules
273
+
ok(eCSStender.matchMedia('screen and (min-width:'+(W-100)+'px) and (max-width:'+(W+100)+'px)'),''+'screen and (min-width:'+(W-100)+'px) and (max-width:'+(W+100)+'px) matches');
274
+
ok(eCSStender.matchMedia('screen and (min-height:'+(H-100)+'px) and (max-height:'+(H+100)+'px)'),''+'screen and (min-height:'+(H-100)+'px) and (max-height:'+(H+100)+'px) matches');
275
+
ok(eCSStender.matchMedia('screen and (min-width:'+(W-100)+'px), screen and (max-width:'+(W+100)+'px)'),''+'screen and (min-width:'+(W-100)+'px), screen and (max-width:'+(W+100)+'px) matches');
276
+
ok(eCSStender.matchMedia('screen and (min-width:'+(W-100)+'px) and (orientation:'+O+')'),''+'screen and (min-width:'+(W-100)+'px) and (orientation:'+O+') matches');
277
+
ok(!eCSStender.matchMedia('screen and (min-width:'+(W-100)+'px) and (orientation:'+(O=='portrait' ? 'landscape' : 'portrait')+')'),''+'screen and (min-width:'+(W-100)+'px) and (orientation:'+(O=='portrait' ? 'landscape' : 'portrait')+') does not match');
278
+
ok(!eCSStender.matchMedia('screen and (max-width:'+(W-100)+'px), screen and (orientation:'+(O=='portrait' ? 'landscape' : 'portrait')+')'),''+'screen and (max-width:'+(W-100)+'px), screen and (orientation:'+(O=='portrait' ? 'landscape' : 'portrait')+') does not match');
0 commit comments