]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Added paramters/mixin docs to position classes
authorharry <harmanmanchanda182@gmail.com>
Sun, 12 Feb 2017 11:46:53 +0000 (17:16 +0530)
committerharry <harmanmanchanda182@gmail.com>
Sun, 12 Feb 2017 11:46:53 +0000 (17:16 +0530)
- position [] Position classes
- z-index [prototype-position-z-index] z-index

scss/prototype/_position.scss

index fc37e52940c5e34fc3ac9e2ea4688e67d2368773..f0a3b371d66767388fc478b3fa27bbda95dfe432 100644 (file)
@@ -18,26 +18,36 @@ $prototype-position-classes: (
 
 /// z-index for fixed positioning
 /// @type Number
-$prototype-position-zindex: 975 !default;
+$prototype-position-z-index: 975 !default;
 
-@mixin position-fixed-top {
-  position: fixed;
+/// Position classes, by default coming through a map `$prototype-position-classes`
+/// @param {String} $position [] Position classes
+@mixin position($position) {
+  position: $position;
+}
+
+/// Position Fixed on top corners
+/// @param {Number} $z-index [$prototype-position-z-index] z-index for `position-fixed-top`
+@mixin position-fixed-top(
+  $z-index: $prototype-position-z-index
+) {
+  @include position(fixed);
   top: 0;
   right: 0;
   left: 0;
-  z-index: $prototype-position-zindex;
+  z-index: $z-index;
 }
 
-@mixin position-fixed-bottom {
-  position: fixed;
+/// Position Fixed on bottom corners
+/// @param {Number} $z-index [$prototype-position-z-index] z-index for `position-fixed-bottom`
+@mixin position-fixed-bottom(
+  $z-index: $prototype-position-z-index
+) {
+  @include position(fixed);
   right: 0;
   bottom: 0;
   left: 0;
-  z-index: $prototype-position-zindex;
-}
-
-@mixin position($position) {
-  position: $position;
+  z-index: $z-index;
 } 
 
 @mixin foundation-prototype-position {