Skip to content

Commit

Permalink
feat(icons): add pokeball icon (#117)
Browse files Browse the repository at this point in the history
* feat(icons): add pokeball icon

* docs(icons): add pokeball to storybook
  • Loading branch information
guastallaigor authored and abdallahalsamman committed Dec 8, 2018
1 parent 31c4845 commit 66576f1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/icons.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ stories.add('icon', () => {
'icon google': 'icon google',
'icon youtube': 'icon youtube',
'icon close': 'icon close',
pokeball: 'pokeball',
'octocat animate': 'octocat animate',
'icon trophy': 'icon trophy',
'nes-logo': 'nes-logo',
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ <h3 class="title">Others</h3>
<i class="icon trophy"></i>
<i class="icon trophy is-medium"></i>
<i class="icon trophy is-large"></i>

<i class="pokeball"></i>
</div>
</section>

Expand Down
1 change: 1 addition & 0 deletions scss/pixel-arts/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
@import "snes-jp-icon.scss";
@import "bcrikko.scss";
@import "octocat.scss";
@import "pokeball.scss";
38 changes: 38 additions & 0 deletions scss/pixel-arts/pokeball.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.pokeball {
$px: 6px;
$pokeball-colors: (#060606, #ff001d, #fff, #9fa1a1);
// prettier-ignore
$pokeball: (
(0,0,0,0,0,1,1,1,1,0,0,0,0,0),
(0,0,0,1,1,2,2,2,2,1,1,0,0,0),
(0,0,1,3,3,2,2,2,2,2,2,1,0,0),
(0,1,3,3,2,2,2,2,2,2,2,1,1,0),
(0,1,3,2,2,2,2,2,2,2,2,2,1,0),
(1,3,2,2,2,2,2,2,2,2,2,2,2,1),
(1,1,1,2,2,2,2,1,1,1,2,2,2,1),
(1,1,1,1,2,2,1,3,3,3,1,2,2,1),
(1,4,3,1,1,1,1,3,3,3,1,1,1,1),
(0,1,3,3,3,1,1,3,3,3,1,3,1,0),
(0,1,3,3,3,3,3,1,1,1,3,3,1,0),
(0,0,1,4,4,3,3,3,3,3,3,1,0,0),
(0,0,0,1,1,4,4,4,4,1,1,0,0,0),
(0,0,0,0,0,1,1,1,1,0,0,0,0,0),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(0,0,0,0,0,0,0,0,0,0,0,0,0,0),
);

position: relative;
display: inline-block;
width: $px * 14;
height: $px * 14;

&::before {
position: absolute;
top: $px * -1;
left: $px * -1;
content: "";
background: transparent;

@include pixelize($pokeball, $pokeball-colors, $px);
}
}

0 comments on commit 66576f1

Please sign in to comment.