Skip to content

Commit

Permalink
Merge pull request #990 from cozy/feat/responsivePositionUtils
Browse files Browse the repository at this point in the history
feat: Responsive position utils
GoOz authored May 17, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents af259dc + e75dbdd commit a5a9e94
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 a5a9e94

Please sign in to comment.