Advertisement
Guest User

Untitled

a guest
Oct 10th, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. /* Simple flexbox based grid system */
  2.  
  3. $columns: 12;
  4.  
  5. @mixin layout-cols($device) {
  6. @for $i from 1 through 12 {
  7. .l-#{$device}-col-#{$i} {
  8. flex: 0 0 $i / $columns * 100%;
  9. }
  10. }
  11. }
  12.  
  13. @mixin responsify {
  14.  
  15. /* Common rules */
  16. .l-container {
  17. margin-left: auto;
  18. margin-right: auto;
  19.  
  20. .row {
  21. display: flex;
  22. flex-wrap: wrap;
  23. flex-direction: row;
  24. justify-content: center;
  25.  
  26. @include layout-cols(d);
  27. }
  28. }
  29.  
  30. /* Tablet rules */
  31. @media only screen
  32. and (max-width: 768px) {
  33. .l-container {
  34. .row {
  35. @include layout-cols(t);
  36. }
  37. }
  38. }
  39.  
  40. /* Mobile rules */
  41. @media only screen
  42. and (max-width: 480px) {
  43. .l-container{
  44. .row {
  45. @include layout-cols(m);
  46. }
  47. }
  48. }
  49.  
  50. }
  51.  
  52. @include responsify;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement