From 27587e5fcaed4cfb21fb8fb34935ebcef9f032d7 Mon Sep 17 00:00:00 2001 From: CPatchane Date: Tue, 23 Apr 2019 17:10:51 +0200 Subject: [PATCH] fix(utilities): Add position utilities --- stylus/cozy-ui/build.styl | 21 +++++++++++++++++++++ stylus/utilities/position.styl | 26 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 stylus/utilities/position.styl diff --git a/stylus/cozy-ui/build.styl b/stylus/cozy-ui/build.styl index ad8559c6d0..032fbad416 100644 --- a/stylus/cozy-ui/build.styl +++ b/stylus/cozy-ui/build.styl @@ -1335,6 +1335,27 @@ Display an chip that represents complex identity Styleguide utilities.display */ +/* + Position + + Classes to change the position of an element + + .u-pos-absolute - Absolute position + .u-pos-relative - Relative position + .u-pos-fixed - Fixed position (relative to the viewport) + .u-pos-sticky - Sticky position + .u-pos-static - Static position + + Markup: +
+
Nulla ex aptent
+
+ + Weight: 1 + + Styleguide utilities.position +*/ + /* Flexbox display diff --git a/stylus/utilities/position.styl b/stylus/utilities/position.styl new file mode 100644 index 0000000000..ab6e6c521f --- /dev/null +++ b/stylus/utilities/position.styl @@ -0,0 +1,26 @@ +@require '../tools/mixins' +/*------------------------------------*\ + Position utilities +\*------------------------------------*/ + +$position-absolute + position absolute + +$position-relative + position relative + +$position-fixed + position fixed + +$position-sticky + position sticky + +$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)