Skip to content

Commit

Permalink
Merge pull request #361 from twbs/device-sprite
Browse files Browse the repository at this point in the history
Use a sprite for device images
  • Loading branch information
mdo committed Mar 1, 2014
2 parents f17a5a1 + 91a7c77 commit 317e70b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions docs/assets/css/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,10 @@ code {
height: 813px;
margin-left: -20px;
font-family: "Helvetica Neue", sans-serif;
background-image: url("../img/iphone5c.png");
background-size: 100%;
background-image: url("../img/device-sprite.png");
background-size: 300%;
background-repeat: no-repeat;
background-position-x: 0;
-webkit-transition: background-image 0.1s linear;
-moz-transition: background-image 0.1s linear;
transition: background-image 0.1s linear;
Expand Down Expand Up @@ -1587,7 +1588,7 @@ hr {
transform: translate3d(-20%, 0, 0);
}
.platform-ios .device {
background-image: url("../img/iphone5s.png");
background-position-x: -395px;
}
.platform-ios .device .device-content {
background-color: #efeff4;
Expand Down Expand Up @@ -2108,7 +2109,7 @@ hr {
}
.platform-android .device {
font-family: 'Roboto', sans-serif;
background-image: url("../img/android.png");
background-position-x: -790px;
}
.platform-android .device .device-content {
font-size: 18px;
Expand Down
Binary file removed docs/assets/img/android.png
Binary file not shown.
Binary file added docs/assets/img/device-sprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/img/iphone5c.png
Binary file not shown.
Binary file removed docs/assets/img/iphone5s.png
Binary file not shown.
11 changes: 6 additions & 5 deletions sass/docs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,10 @@ code {
height: 813px;
margin-left: -20px;
font-family: "Helvetica Neue", sans-serif;
background-image: url("../img/iphone5c.png");
background-size: 100%;
background-image: url("../img/device-sprite.png");
background-size: 300%;
background-repeat: no-repeat;
background-position-x: 0;
@include transition(background-image .1s linear);

&.device-fixed {
Expand Down Expand Up @@ -1138,8 +1139,8 @@ hr {
@import "theme-ios.scss";

.device {
background-image: url("../img/iphone5s.png");

background-position-x: -395px;
.device-content {
background-color: #efeff4;
}
Expand All @@ -1150,7 +1151,7 @@ hr {

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

.device-content {
font-size: 18px;
Expand Down

0 comments on commit 317e70b

Please sign in to comment.