Skip to content

Commit

Permalink
Added scrollable ability.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjohnsonaz committed Aug 2, 2018
1 parent 93d043d commit 88830d9
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/styl/abilities/scrollable.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.scrollable
&:not([data-scroll])
&[data-scroll="auto"]
overflow: auto

&[data-scroll="both"]
overflow: scroll

&[data-scroll="none"]
overflow: hidden

&[data-scroll="x"]
overflow-x: auto

&[data-scroll="y"]
overflow-y: auto

&[data-scroll="x-always"]
overflow-x: scroll

&[data-scroll="y-always"]
overflow-y: scroll

&[data-scroll="x-never"]
overflow-x: hidden

&[data-scroll="y-never"]
overflow-y: hidden

.scrollable-y
overflow-y: auto

.scrollable-x
overflow-x: auto
1 change: 1 addition & 0 deletions src/styl/main.styl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@require "core/align.styl";
@require "abilities/closeable.styl";
@require "abilities/fillable.styl";
@require "abilities/scrollable.styl";
@require "animation/animation.styl";
@require "animation/transition.styl";
@require "badge/badge.styl";
Expand Down
4 changes: 4 additions & 0 deletions test/views/abilities.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@
</div>
</div>
</div>

<h3>Scrollable</h3>
<div class="scrollable" id="scrollable" data-scroll="y">
</div>
</div>
</section>

0 comments on commit 88830d9

Please sign in to comment.