Skip to content

Commit 317e70b

Browse files
committed
Merge pull request #361 from twbs/device-sprite
Use a sprite for device images
2 parents f17a5a1 + 91a7c77 commit 317e70b

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

docs/assets/css/docs.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -924,9 +924,10 @@ code {
924924
height: 813px;
925925
margin-left: -20px;
926926
font-family: "Helvetica Neue", sans-serif;
927-
background-image: url("../img/iphone5c.png");
928-
background-size: 100%;
927+
background-image: url("../img/device-sprite.png");
928+
background-size: 300%;
929929
background-repeat: no-repeat;
930+
background-position-x: 0;
930931
-webkit-transition: background-image 0.1s linear;
931932
-moz-transition: background-image 0.1s linear;
932933
transition: background-image 0.1s linear;
@@ -1587,7 +1588,7 @@ hr {
15871588
transform: translate3d(-20%, 0, 0);
15881589
}
15891590
.platform-ios .device {
1590-
background-image: url("../img/iphone5s.png");
1591+
background-position-x: -395px;
15911592
}
15921593
.platform-ios .device .device-content {
15931594
background-color: #efeff4;
@@ -2108,7 +2109,7 @@ hr {
21082109
}
21092110
.platform-android .device {
21102111
font-family: 'Roboto', sans-serif;
2111-
background-image: url("../img/android.png");
2112+
background-position-x: -790px;
21122113
}
21132114
.platform-android .device .device-content {
21142115
font-size: 18px;

docs/assets/img/android.png

-86.2 KB
Binary file not shown.

docs/assets/img/device-sprite.png

249 KB
Loading

docs/assets/img/iphone5c.png

-61.2 KB
Binary file not shown.

docs/assets/img/iphone5s.png

-79.8 KB
Binary file not shown.

sass/docs.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -962,9 +962,10 @@ code {
962962
height: 813px;
963963
margin-left: -20px;
964964
font-family: "Helvetica Neue", sans-serif;
965-
background-image: url("../img/iphone5c.png");
966-
background-size: 100%;
965+
background-image: url("../img/device-sprite.png");
966+
background-size: 300%;
967967
background-repeat: no-repeat;
968+
background-position-x: 0;
968969
@include transition(background-image .1s linear);
969970

970971
&.device-fixed {
@@ -1138,8 +1139,8 @@ hr {
11381139
@import "theme-ios.scss";
11391140

11401141
.device {
1141-
background-image: url("../img/iphone5s.png");
1142-
1142+
background-position-x: -395px;
1143+
11431144
.device-content {
11441145
background-color: #efeff4;
11451146
}
@@ -1150,7 +1151,7 @@ hr {
11501151

11511152
.device {
11521153
font-family: 'Roboto', sans-serif;
1153-
background-image: url("../img/android.png");
1154+
background-position-x: -790px;
11541155

11551156
.device-content {
11561157
font-size: 18px;

0 commit comments

Comments
 (0)