Skip to content

Commit

Permalink
feat(component): Inserting lists with examples
Browse files Browse the repository at this point in the history
Inserting tag <ul> to implment list, with two examples

#179
  • Loading branch information
lucas.reis committed Dec 12, 2018
1 parent 3d0dbfa commit 2e4ff79
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 20 deletions.
21 changes: 21 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,27 @@ <h2 class="title">Balloons</h2>
</div>
</section>

<section class="nes-container with-title">
<h2 class="title">Lists</h2>
<div class="lists">
<ul class="nes-list is-circle">
<li>Test1</li>
<li>Test2</li>
<li>Test3</li>
<li>Test4</li>
</ul>
</div>

<div class="lists">
<ul class="nes-list is-arrow">
<li>Test1</li>
<li>Test2</li>
<li>Test3</li>
<li>Test4</li>
</ul>
</div>
</section>

<section class="nes-container with-title">
<h2 class="title">Table</h2>
<div class="tables">
Expand Down
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions scss/elements/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import "containers.scss";
@import "radios.scss";
@import "checkboxes.scss";
@import "lists.scss";
@import "balloons.scss";
@import "tables.scss";
@import "progress.scss";
Expand Down
47 changes: 47 additions & 0 deletions scss/elements/lists.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.nes-list {
$ball: (
(0, 0, 0, 1, 1, 0, 0, 0),
(0, 0, 1, 1, 1, 1, 0, 0),
(0, 1, 1, 1, 1, 1, 1, 0),
(0, 1, 1, 1, 1, 1, 1, 0),
(0, 0, 1, 1, 1, 1, 0, 0),
(0, 0, 0, 1, 1, 0, 0, 0)
);

$arrow: (
(0, 0, 0, 1, 1, 0, 0, 0),
(0, 0, 0, 1, 1, 1, 0, 0),
(0, 0, 0, 1, 1, 1, 1, 0),
(0, 0, 0, 1, 1, 1, 1, 0),
(0, 0, 0, 1, 1, 1, 0, 0),
(0, 0, 0, 1, 1, 0, 0, 0)
);
$colors: ($base-color, map-get($default-colors, "shadow"));

list-style-type: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;

& li {
position: relative;
}

&.is-circle li::before {
position: absolute;
top: calc(50% - 10px);
left: -20px;
content: "";

@include pixelize($ball, $colors, 2px);
}

&.is-arrow li::before {
position: absolute;
top: calc(50% - 10px);
left: -20px;
content: "";

@include pixelize($arrow, $colors, 2px);
}
}

0 comments on commit 2e4ff79

Please sign in to comment.