Skip to content

Commit

Permalink
Apple Watch fixes and restructure of watch
Browse files Browse the repository at this point in the history
  • Loading branch information
stuyam committed Feb 17, 2015
1 parent ef05e11 commit 5f71e14
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/.sass-cache
/sass/.sass-cache

devices.min.css.map
4 changes: 2 additions & 2 deletions devices.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/iphone.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}
</style>

<div class="cd-iphone-6">
<div class="cd-iphone-6 cd-fill-parent">
<div class="cd-body">
<div class="cd-sound"></div>
<div class="cd-sleep"></div>
Expand Down
3 changes: 1 addition & 2 deletions examples/watch.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
</style>

<div class="cd-watch">
<div class="cd-top-bracket"></div>
<div class="cd-bracket"></div>
<div class="cd-top-band"></div>
<div class="cd-bottom-bracket"></div>
<div class="cd-bottom-band"></div>
<div class="cd-body"></div>
<div class="cd-crown"></div>
Expand Down
31 changes: 12 additions & 19 deletions sass/_watch.scss
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
.cd-watch{
width: map-get($watch, width);
height: map-get($watch, height);
[class$='-bracket']{
height: map-get($watch, screen-height);
.cd-bracket{
height: map-get($watch, screen-height) + 5.4em;
width: map-get($watch, screen-width);
left: 50%;
margin-left: -1 * map-get($watch, screen-width)/2;
border: .5em solid $watch-silver-body;
border-radius: .8em;
}
.cd-top-bracket{
top: 4.3em;
}
.cd-bottom-bracket{
bottom: 4.3em;
}
[class$='-band']{
width: 9em;
height: 8em;
height: 7em;
background: $blue-band;
left: 50%;
margin-left: -4.5em;
border-radius: .4em;
}
.cd-top-band{
top: -1.4em;
border-radius: .5em .5em 0 0;
top: -1.2em;
transform: perspective( 30em ) rotateX( 45deg );
-webkit-transform: perspective( 30em ) rotateX( 45deg );
-ms-transform: perspective( 30em ) rotateX( 45deg );
}
.cd-bottom-band{
bottom: -1.4em;
border-radius: 0 0 .5em .5em;
bottom: -1.2em;
transform: perspective( 30em ) rotateX( -45deg );
-webkit-transform: perspective( 30em ) rotateX( -45deg );
-ms-transform: perspective( 30em ) rotateX( -45deg );
Expand Down Expand Up @@ -79,7 +75,7 @@
}
}
&.cd-no-bracket{
[class$='-bracket']{
.cd-bracket{
display: none;
}
}
Expand All @@ -89,7 +85,7 @@
.cd-button{
background: $watch-black-body;
}
[class$='-bracket'],
.cd-bracket,
.cd-body{
border-color: $watch-black-body;
}
Expand All @@ -99,7 +95,7 @@
.cd-button{
background: $watch-gold-body;
}
[class$='-bracket'],
.cd-bracket,
.cd-body{
border-color: $watch-gold-body;
}
Expand All @@ -109,7 +105,7 @@
.cd-button{
background: $watch-rosegold-body;
}
[class$='-bracket'],
.cd-bracket,
.cd-body{
border-color: $watch-rosegold-body;
}
Expand Down Expand Up @@ -158,12 +154,9 @@
}

.cd-watch.cd-blueprint{
.cd-top-bracket{
.cd-bracket{
top: 4.6em;
}
.cd-bottom-bracket{
bottom: 4.6em;
}
.cd-crown,
.cd-button{
border-left: none !important;
Expand Down
2 changes: 1 addition & 1 deletion sass/devices.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! CSSDevices v2.0.0 alpha| MIT license | Maintained by Stuart Yamartino | http://yamartino.github.io/CSSDevices */
/*! CSSDevices v2.0.1 | MIT license | Maintained by Stuart Yamartino | http://yamartino.github.io/CSSDevices */
@import 'vars';

@import 'iphone';
Expand Down

0 comments on commit 5f71e14

Please sign in to comment.