Sass position Mixins with z-index

During the development I got tried of using positions and all related properties, So I decided to makes a mixing to fix it for all.

So here it is

forget about what I did in deep,
totally I made 3 useful mixin ,

  1. _absolute_mix (for absolute positions)
  2. _fixed_mix (for fixed positions)
  3. _relative_mix (for relative positions)

the usage all are same as each other. each mixing will accept 2 parameter.
first parameter which is mandatory is the value of 1 or 4 possible directions.(top, bottom, right, left)
second parameter which optional and you can skip it if you want is ‘z-index’ value. what ever you pass it will set as z-index value.

example usage:

set value as Zero like below

and also you can use any kind of values, like % or em or …

any queries? leave a comment.


Leave A Comment?