Skip to content

Commit

Permalink
feat: Responsive position utils
Browse files Browse the repository at this point in the history
  • Loading branch information
GoOz committed May 17, 2019
1 parent 5121c72 commit e75dbdd
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions stylus/utilities/position.styl
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
@require '../settings/breakpoints'
@require '../tools/mixins'
/*------------------------------------*\
Position utilities
\*------------------------------------*/

$position-absolute
position-absolute()
position absolute

$position-relative
position-relative()
position relative

$position-fixed
position-fixed()
position fixed

$position-sticky
position-sticky()
position sticky

$position-static
position-static()
position static

// Global classes
global('.u-pos-absolute', $position-absolute)
global('.u-pos-relative', $position-relative)
global('.u-pos-fixed', $position-fixed)
global('.u-pos-sticky', $position-sticky)
global('.u-pos-static', $position-static)
props = {
'position-absolute': 'pos-absolute',
'position-relative': 'pos-relative',
'position-fixed': 'pos-fixed',
'position-sticky': 'pos-sticky',
'position-static': 'pos-static',
}

if cssmodules == true
cssModulesUtils(props, breakpoints)
else
nativeUtils(props, breakpoints)

0 comments on commit e75dbdd

Please sign in to comment.