-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsml.css
More file actions
90 lines (67 loc) · 2.44 KB
/
Copy pathsml.css
File metadata and controls
90 lines (67 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/* This sets the small image as the default */
.md,
.lg {
display: none;
}
/* Set the default (mobile) container sizes and the default sprite */
.logo {
background: url('./img/sprite_sm.png') no-repeat 0 0;
height: 50px;
overflow: hidden;
text-indent: -9999px;
width: 100px;
}
.photo {
height: 200px;
width: 100px;
}
/* For mobile/high-pixel-density */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) and (max-width: 600px), only screen and (-o-min-device-pixel-ratio: 3/2) and (max-width: 600px), only screen and (min--moz-device-pixel-ratio: 1.5) and (max-width: 600px), only screen and (min-device-pixel-ratio: 1.5) and (max-width: 600px) {
.sm { display: none; }
.md { display: inline; }
.logo {
background-image: url('./img/sprite_md.png');
background-size: 100px; /* This should be half the width of the sprite */
}
}
/* For desktop/tablet - image sizes doubled */
@media screen and (min-width: 601px) {
.sm { display: none; }
.md { display: inline; }
.logo { /* Note: this is on a seperate line so you can just add other sprited elements */
background-image: url('./img/sprite_md.png');
background-size: 200px; /* This should be actual the width of the sprite */
}
.logo {
height: 100px;
width: 200px;
}
.photo {
height: 400px;
width: 200px;
}
}
/* For desktop/tablet w. high-pixel-density */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) and (min-width: 601px), only screen and (-o-min-device-pixel-ratio: 3/2) and (min-width: 601px), only screen and (min--moz-device-pixel-ratio: 1.5) and (min-width: 601px), only screen and (min-device-pixel-ratio: 1.5) and (min-width: 601px) {
.sm, .md { display: none; }
.lg { display: inline; }
.logo {
background-image: url('./img/sprite_lg.png');
background-size: 200px; /* Half the width of the sprite! */
}
}
/* Finally, a fallback for IE8 or lower. This is effectively duplicating the desktop/tablet css */
.lt-ie9 .sm { display: none; }
.lt-ie9 .md { display: inline; }
.lt-ie9 .logo {
height: 100px;
width: 200px;
}
.lt-ie9 .logo { /* Note: this is on a seperate line so you can just add other sprited elements */
background-image: url('./img/sprite_md.png');
background-size: 200px; /* This should be actual the width of the sprite */
}
.lt-ie9 .photo {
height: 400px;
width: 200px;
}