Posted By

FrederickWeiss on 03/23/14


Tagged

SASS mixin


Versions (?)

Absolute Positioned


 / Published in: CSS
 

  1. Pass in the desired location of your target element to produce all the necessary positioning code.
  2.  
  3. @mixin abs-pos ($top: auto, $right: auto, $bottom: auto, $left: auto) {
  4. top: $top;
  5. right: $right;
  6. bottom: $bottom;
  7. left: $left;
  8. position: absolute;
  9. }
  10.  
  11.  
  12.  
  13.  
  14. Usage:
  15.  
  16. .abs {
  17. @include abs-pos(10px, 10px, 5px, 15px);
  18. }

Report this snippet  

You need to login to post a comment.