Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. /**
  2. * ibgrid.scss
  3. *
  4. * An inline-block grid.
  5. */
  6.  
  7. /*
  8. Variables
  9. */
  10. $gutter-size: 1.25rem !default;
  11.  
  12. /*
  13. Core
  14. */
  15. /* Container */
  16. .container-fluid,
  17. .container {
  18. margin-right: auto;
  19. margin-left: auto;
  20. padding-right: $gutter-size;
  21. padding-left: $gutter-size;
  22.  
  23. /* Clearfix */
  24. &:before,
  25. &:after {
  26. content: "";
  27. display: table;
  28. }
  29. &:after {
  30. clear: both;
  31. }
  32. }
  33.  
  34.  
  35. /* Rows */
  36. .row {
  37. display: block;
  38. margin-left: -$gutter-size;
  39. margin-right: -$gutter-size;
  40. text-rendering: optimizespeed;
  41. letter-spacing: -0.31em;
  42. word-spacing: -0.43em;
  43. }
  44.  
  45. /* Columns */
  46. .row > div {
  47. position: relative;
  48. display: inline-block;
  49. *display: inline;
  50. zoom: 1;
  51. padding-left: $gutter-size;
  52. padding-right: $gutter-size;
  53. vertical-align: top;
  54. box-sizing: border-box;
  55. letter-spacing: normal;
  56. word-spacing: normal;
  57. }
  58.  
  59. // center vertically
  60. .row.middle-xs > div {
  61. vertical-align: middle;
  62. }
  63.  
  64. /*
  65. Mobile
  66. */
  67. @for $i from 1 through 12 {
  68. .col-xs-#{$i} {
  69. width: percentage($i/12);
  70. }
  71. .col-xs-offset-#{$i} {
  72. margin-left: percentage($i/12);
  73. }
  74. .col-xs-push-#{$i} {
  75. left: percentage($i/12);
  76. }
  77. .col-xs-pull-#{$i} {
  78. right: percentage($i/12);
  79. }
  80. }
  81.  
  82. /*
  83. Small
  84. */
  85. @media only screen and (min-width: $break-sm) {
  86. .container {
  87. width: $break-sm - (2 * $gutter-size);
  88. }
  89.  
  90. @for $i from 1 through 12 {
  91. .col-sm-#{$i} {
  92. width: percentage($i/12);
  93. }
  94. .col-sm-offset-#{$i} {
  95. margin-left: percentage($i/12);
  96. }
  97. .col-sm-push-#{$i} {
  98. left: percentage($i/12);
  99. }
  100. .col-sm-pull-#{$i} {
  101. right: percentage($i/12);
  102. }
  103. }
  104.  
  105. .row.middle-sm > div {
  106. vertical-align: middle;
  107. }
  108. }
  109.  
  110. /*
  111. Medium
  112. */
  113. @media only screen and (min-width: $break-md) {
  114. .container {
  115. width: $break-md - (2 * $gutter-size);
  116. }
  117.  
  118. @for $i from 1 through 12 {
  119. .col-md-#{$i} {
  120. width: percentage($i/12);
  121. }
  122. .col-md-offset-#{$i} {
  123. margin-left: percentage($i/12);
  124. }
  125. .col-md-push-#{$i} {
  126. left: percentage($i/12);
  127. }
  128. .col-md-pull-#{$i} {
  129. right: percentage($i/12);
  130. }
  131. }
  132.  
  133. .row.middle-md > div {
  134. vertical-align: middle;
  135. }
  136. }
  137.  
  138. /*
  139. Large
  140. */
  141. @media only screen and (min-width: $break-lg) {
  142. .container {
  143. width: $break-lg - (2 * $gutter-size);
  144. }
  145.  
  146. @for $i from 1 through 12 {
  147. .col-lg-#{$i} {
  148. width: percentage($i/12);
  149. }
  150. .col-lg-offset-#{$i} {
  151. margin-left: percentage($i/12);
  152. }
  153. .col-lg-push-#{$i} {
  154. left: percentage($i/12);
  155. }
  156. .col-lg-pull-#{$i} {
  157. right: percentage($i/12);
  158. }
  159. }
  160.  
  161. .row.middle-lg > div {
  162. vertical-align: middle;
  163. }
  164. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement