forked from ThemeSpectre/Linen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_2x.scss
executable file
·40 lines (29 loc) · 1.17 KB
/
_2x.scss
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
/******************************************************************
Stylesheet: Retina Screens & Devices Stylesheet
When handling retina screens you need to make adjustments, especially
if you're not using font icons. Here you can add them in one neat
place.
******************************************************************/
/*
EXAMPLE
Let's say you have an image and you need to make sure it looks ok
on retina screens. Let's say we have an icon which dimension are
24px x 24px. In your regular stylesheets, it would look something
like this:
.icon {
width: 24px;
height: 24px;
background: url(img/test.png) no-repeat;
}
For retina screens, we have to make some adjustments, so that image
doesn't look blurry. So, taking into account the image above and the
dimensions, this is what we would put in our retina stylesheet:
.icon {
background: url(img/[email protected]) no-repeat;
background-size: 24px 24px;
}
So, you would create the same icon, but at double the resolution, meaning
it would be 48px x 48px. You'd name it the same, but with a @2x at the end
(this is pretty standard practice). Set the background image so it matches
the original dimensions and you are good to go.
*/