Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
correct and spritify icon buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
johngruen committed Aug 11, 2017
1 parent 2b60163 commit 4f08f2f
Show file tree
Hide file tree
Showing 19 changed files with 88 additions and 255 deletions.
49 changes: 2 additions & 47 deletions static/css/frame.scss
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@
}
}

// TODO: investigate favicons not appearing on dev, stage and prod
.favicon {
background-size: 16px 16px;
display: none;
height: 16px;
margin-right: 6px;
width: 16px;
Expand Down Expand Up @@ -244,50 +246,3 @@
#clip-image-context {
display: none;
}

.trash,
.flag,
.share {
background-size: $grid-unit $grid-unit;
background-repeat: no-repeat;
background-position: center center;
margin-right: $grid-unit * 0.5;
transition: background-image 150ms $bezier;
}

.trash {
background-image: url("../img/trash-dark.svg");

&:hover {
background-image: url("../img/trash-hover.svg");
}

&:active {
background-image: url("../img/trash-active.svg");
}
}

.share {
background-image: url("../img/share-dark.svg");

&:hover {
background-image: url("../img/share-hover.svg");
}

&:active,
&.active {
background-image: url("../img/share-active.svg");
}
}

.flag {
background-image: url("../img/flag-dark.svg");

&:hover {
background-image: url("../img/flag-hover.svg");
}

&:active {
background-image: url("../img/flag-active.svg");
}
}
59 changes: 59 additions & 0 deletions static/css/partials/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,63 @@
background: $light-active;
}
}

&.download,
&.trash,
&.share,
&.flag {
background-image: url("../img/icon-sprite.svg");
background-size: $grid-unit * 24 $grid-unit * 2;
background-repeat: no-repeat;
background-position: 0 0;
margin-right: $grid-unit * 0.5;
transition: background-color 150ms $bezier;
}

&.download {
&:hover {
background-position: -2 * $grid-unit 0;
}

&:active {
background-position: -4 * $grid-unit 0;
}
}

&.share {
background-position: -6 * $grid-unit 0;

&:hover {
background-position: -8 * $grid-unit 0;
}

&:active,
&.active {
background-position: -10 * $grid-unit 0;
}
}

&.trash {
background-position: -12 * $grid-unit 0;

&:hover {
background-position: -14 * $grid-unit 0;
}

&:active {
background-position: -16 * $grid-unit 0;
}
}

&.flag {
background-position: -18 * $grid-unit 0;

&:hover {
background-position: -20 * $grid-unit 0;
}

&:active {
background-position: -22 * $grid-unit 0;
}
}
}
56 changes: 6 additions & 50 deletions static/css/shot-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ h1 {

.shot-image-container {
background-size: cover;
box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05) inset;
}

&.square .shot-image-container {
Expand All @@ -180,8 +181,8 @@ h1 {

&.deleted {
opacity: 0;
transform: scale(0);
transition: transform 250ms $bezier, opacity 250ms $bezier;
transform: scale(.5);
transition: transform 500ms $bezier, opacity 500ms $bezier;

}

Expand All @@ -203,11 +204,13 @@ h1 {
.link-container {
@include flex-container(row, flex-start, center);

// TODO: investigate favicons not appearing on dev, stage and prod
.favicon {
background-size: 16px 16px;
display: none;
flex: 0 0 16px;
height: 16px;
margin-right: 6px;
background-size: 16px 16px;
}

.shot-url {
Expand All @@ -223,53 +226,6 @@ h1 {
height: 45px;
margin: 12px;
}

.download,
.trash,
.share {
background-size: $grid-unit $grid-unit;
background-repeat: no-repeat;
background-position: center center;
margin-right: $grid-unit * 0.5;
transition: background-image 150ms $bezier;
}

.trash {
background-image: url("../img/trash-dark.svg");

&:hover {
background-image: url("../img/trash-hover.svg");
}

&:active {
background-image: url("../img/trash-active.svg");
}
}

.share {
background-image: url("../img/share-dark.svg");

&:hover {
background-image: url("../img/share-hover.svg");
}

&:active,
&.active {
background-image: url("../img/share-active.svg");
}
}

.download {
background-image: url("../img/download-dark.svg");

&:hover {
background-image: url("../img/download-hover.svg");
}

&:active {
background-image: url("../img/download-active.svg");
}
}
}

.preferences {
Expand Down
11 changes: 0 additions & 11 deletions static/img/download-active.svg

This file was deleted.

11 changes: 0 additions & 11 deletions static/img/download-dark.svg

This file was deleted.

11 changes: 0 additions & 11 deletions static/img/download-hover.svg

This file was deleted.

20 changes: 20 additions & 0 deletions static/img/download-sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 0 additions & 13 deletions static/img/flag-active.svg

This file was deleted.

13 changes: 0 additions & 13 deletions static/img/flag-dark.svg

This file was deleted.

13 changes: 0 additions & 13 deletions static/img/flag-hover.svg

This file was deleted.

1 change: 1 addition & 0 deletions static/img/icon-sprite.svg
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 static/img/landing-icon-32.png
Binary file not shown.
17 changes: 0 additions & 17 deletions static/img/my-shots.svg

This file was deleted.

12 changes: 0 additions & 12 deletions static/img/share-active.svg

This file was deleted.

12 changes: 0 additions & 12 deletions static/img/share-dark.svg

This file was deleted.

12 changes: 0 additions & 12 deletions static/img/share-hover.svg

This file was deleted.

11 changes: 0 additions & 11 deletions static/img/trash-active.svg

This file was deleted.

Loading

0 comments on commit 4f08f2f

Please sign in to comment.