Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. @mixin inline-block-lr($container,$left,$right){
  2. #{$container}{
  3. text-align: justify;
  4.  
  5. &:after{
  6. content: '';
  7. display: inline-block;
  8. width: 100%;
  9. height: 0;
  10. font-size:0;
  11. line-height:0;
  12. }
  13. }
  14.  
  15. #{$left} {
  16. display: inline-block;
  17. vertical-align: middle;
  18. }
  19.  
  20. #{$right} {
  21. display: inline-block;
  22. vertical-align: middle;
  23. }
  24. }
  25. It accepts 3 parameters. The container, the left and the right element. For example, to fit the question, you could use it like this:
  26.  
  27. @include inline-block-lr('header', 'h1', 'nav');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement