1
1
module Media exposing (..)
2
2
3
3
import Css exposing (..)
4
- import Css.Foreign exposing (Snippet , a , body , button , class , media , mediaQuery , p )
4
+ import Css.Foreign exposing (Snippet , a , body , button , class , li , media , mediaQuery , p , ul )
5
5
import Css.Media as Media exposing (..)
6
6
import Css.Preprocess exposing (stylesheet )
7
7
import Expect
@@ -259,9 +259,25 @@ testWithMedia =
259
259
[ Css . color ( hex " 333333" )
260
260
, withMedia [ only print [], Media . all [ monochrome ] ] [ Css . color ( hex " 000000" ) ]
261
261
]
262
+ , p
263
+ [ withMedia [ only screen [] ] [ textDecoration underline ]
264
+ , Css . color ( hex " AA0000" )
265
+ ]
262
266
, a
263
- [ Css . color ( hex " FF0000" )
267
+ [ withMedia [ only print [] ] [ textDecoration none ]
268
+ , withMedia [ only screen [] ] [ textDecoration underline ]
269
+ , Css . color ( hex " BB0000" )
270
+ ]
271
+ , ul
272
+ [ Css . color ( hex " CC0000" )
264
273
, withMedia [ only print [] ] [ textDecoration none ]
274
+ , withMedia [ only screen [] ] [ textDecoration underline ]
275
+ ]
276
+ , li
277
+ [ Css . color ( hex " DD0000" )
278
+ , withMedia [ only print [] ] [ textDecoration none ]
279
+ , withMedia [ only screen [] ] [ textDecoration underline ]
280
+ , Css . backgroundColor ( hex " EE0000" )
265
281
]
266
282
, class Container
267
283
[ Css . maxWidth ( px 800 )
@@ -285,10 +301,26 @@ testWithMedia =
285
301
body {
286
302
color:#000000;
287
303
}
288
- }
304
+ }
305
+
306
+ p {
307
+ color:#AA0000;
308
+ }
309
+
310
+ @media only screen {
311
+ p {
312
+ text-decoration:underline;
313
+ }
314
+ }
289
315
290
316
a {
291
- color:#FF0000;
317
+ color:#BB0000;
318
+ }
319
+
320
+ @media only screen {
321
+ a {
322
+ text-decoration:underline;
323
+ }
292
324
}
293
325
294
326
@media only print {
@@ -297,6 +329,39 @@ testWithMedia =
297
329
}
298
330
}
299
331
332
+ ul {
333
+ color:#CC0000;
334
+ }
335
+
336
+ @media only screen {
337
+ ul {
338
+ text-decoration:underline;
339
+ }
340
+ }
341
+
342
+ @media only print {
343
+ ul {
344
+ text-decoration:none;
345
+ }
346
+ }
347
+
348
+ li {
349
+ color:#DD0000;
350
+ background-color:#EE0000;
351
+ }
352
+
353
+ @media only screen {
354
+ li {
355
+ text-decoration:underline;
356
+ }
357
+ }
358
+
359
+ @media only print {
360
+ li {
361
+ text-decoration:none;
362
+ }
363
+ }
364
+
300
365
.Container {
301
366
max-width:800px;
302
367
}
0 commit comments