Skip to content

Commit

Permalink
Merge pull request #1090 from cozy/feat/overflowUtils
Browse files Browse the repository at this point in the history
Feat/overflow utils
  • Loading branch information
GoOz authored Jul 8, 2019
2 parents 40f1659 + 58b0b30 commit 7df9727
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
21 changes: 19 additions & 2 deletions stylus/cozy-ui/build.styl
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ Display an chip that represents complex identity
Markup:
<div class="{{modifier_class}}" style="display: inline-block; width: 10rem; height: 2rem; border: 1px solid black;"></div>
Weight: 14
Weight: 15
Styleguide utilities.opacity
*/
Expand All @@ -1868,5 +1868,22 @@ Display an chip that represents complex identity
Styleguide utilities.effects
Weight: 15
Weight: 16
*/

/*
Overflow
Tells a container how its exceeding content behaves
Markup: <div style="border:1px solid silver;" class="u-mb-2 u-p-half u-w-5 u-h-4 {{modifier_class}}">Non habitant lobortis hac maecenas eleifend donec parturient, lacinia aenean ac varius mattis purus scelerisque, congue montes dapibus tempor semper proin. Ullamcorper malesuada proin nec accumsan fermentum ac suspendisse posuere, lectus tristique tortor lorem faucibus primis sodales.</div>
.u-ov-visible - Sets a visible overflow
.u-ov-hidden - Sets an hidden overflow
.u-ov-scroll - Sets a scroll overflow
.u-ov-auto - Sets an auto overflow
Weight: 17
Styleguide utilities.overflow
*/
25 changes: 25 additions & 0 deletions stylus/utilities/overflow.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*------------------------------------*\
Overflow utilities
\*------------------------------------*/

overflow-visible()
overflow visible

overflow-hidden()
overflow hidden

overflow-scroll()
overflow scroll

overflow-auto()
overflow auto

// Global classes
global('.u-ov-visible', overflow-visible, mixin)

global('.u-ov-hidden', overflow-hidden, mixin)

global('.u-ov-scroll', overflow-scroll, mixin)

global('.u-ov-auto', overflow-auto, mixin)

0 comments on commit 7df9727

Please sign in to comment.