_grid.scss 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. /******************************************************************
  2. Site Name:
  3. Author:
  4. Stylesheet: Grid Stylesheet
  5. I've seperated the grid so you can swap it out easily. It's
  6. called at the top the style.scss stylesheet.
  7. There are a ton of grid solutions out there. You should definitely
  8. experiment with your own. Here are some recommendations:
  9. http://gridsetapp.com - Love this site. Responsive Grids made easy.
  10. http://susy.oddbird.net/ - Grids using Compass. Very elegant.
  11. http://gridpak.com/ - Create your own responsive grid.
  12. https://github.com/dope/lemonade - Neat lightweight grid.
  13. The grid below is a custom built thingy I modeled a bit after
  14. Gridset. It's VERY basic and probably shouldn't be used on
  15. your client projects. The idea is you learn how to roll your
  16. own grids. It's better in the long run and allows you full control
  17. over your project's layout.
  18. ******************************************************************/
  19. // using a mixin since we can't use placeholder selectors
  20. @mixin grid-col {
  21. float: left;
  22. padding-right: 0.75em;
  23. }
  24. // the last column
  25. .last-col {
  26. float: right;
  27. padding-right: 0 !important;
  28. }
  29. /*
  30. Mobile Grid Styles
  31. These are the widths for the mobile grid.
  32. There are four types, but you can add or customize
  33. them however you see fit.
  34. */
  35. @media (max-width: 767px) {
  36. .m-all {
  37. @include grid-col;
  38. width: 100%;
  39. padding-right: 0;
  40. }
  41. .m-1of2 {
  42. @include grid-col;
  43. width: 50%;
  44. }
  45. .m-1of3 {
  46. @include grid-col;
  47. width: 33.33%;
  48. }
  49. .m-2of3 {
  50. @include grid-col;
  51. width: 66.66%;
  52. }
  53. .m-1of4 {
  54. @include grid-col;
  55. width: 25%;
  56. }
  57. .m-3of4 {
  58. @include grid-col;
  59. width: 75%;
  60. }
  61. } // end mobile styles
  62. /* Portrait tablet to landscape */
  63. @media (min-width: 768px) and (max-width: 1029px) {
  64. .t-all {
  65. @include grid-col;
  66. width: 100%;
  67. padding-right: 0;
  68. }
  69. .t-1of2 {
  70. @include grid-col;
  71. width: 50%;
  72. }
  73. .t-1of3 {
  74. @include grid-col;
  75. width: 33.33%;
  76. }
  77. .t-2of3 {
  78. @include grid-col;
  79. width: 66.66%;
  80. }
  81. .t-1of4 {
  82. @include grid-col;
  83. width: 25%;
  84. }
  85. .t-3of4 {
  86. @include grid-col;
  87. width: 75%;
  88. }
  89. .t-1of5 {
  90. @include grid-col;
  91. width: 20%;
  92. }
  93. .t-2of5 {
  94. @include grid-col;
  95. width: 40%;
  96. }
  97. .t-3of5 {
  98. @include grid-col;
  99. width: 60%;
  100. }
  101. .t-4of5 {
  102. @include grid-col;
  103. width: 80%;
  104. }
  105. } // end tablet
  106. /* Landscape to small desktop */
  107. @media (min-width: 1030px) {
  108. .d-all {
  109. @include grid-col;
  110. width: 100%;
  111. padding-right: 0;
  112. }
  113. .d-1of2 {
  114. @include grid-col;
  115. width: 50%;
  116. }
  117. .d-1of3 {
  118. @include grid-col;
  119. width: 33.33%;
  120. }
  121. .d-2of3 {
  122. @include grid-col;
  123. width: 66.66%;
  124. }
  125. .d-1of4 {
  126. @include grid-col;
  127. width: 25%;
  128. }
  129. .d-3of4 {
  130. @include grid-col;
  131. width: 75%;
  132. }
  133. .d-1of5 {
  134. @include grid-col;
  135. width: 20%;
  136. }
  137. .d-2of5 {
  138. @include grid-col;
  139. width: 40%;
  140. }
  141. .d-3of5 {
  142. @include grid-col;
  143. width: 60%;
  144. }
  145. .d-4of5 {
  146. @include grid-col;
  147. width: 80%;
  148. }
  149. .d-1of6 {
  150. @include grid-col;
  151. width: 16.6666666667%;
  152. }
  153. .d-1of7 {
  154. @include grid-col;
  155. width: 14.2857142857%;
  156. }
  157. .d-2of7 {
  158. @include grid-col;
  159. width: 28.5714286%;
  160. }
  161. .d-3of7 {
  162. @include grid-col;
  163. width: 42.8571429%;
  164. }
  165. .d-4of7 {
  166. @include grid-col;
  167. width: 57.1428572%;
  168. }
  169. .d-5of7 {
  170. @include grid-col;
  171. width: 71.4285715%;
  172. }
  173. .d-6of7 {
  174. @include grid-col;
  175. width: 85.7142857%;
  176. }
  177. .d-1of8 {
  178. @include grid-col;
  179. width: 12.5%;
  180. }
  181. .d-1of9 {
  182. @include grid-col;
  183. width: 11.1111111111%;
  184. }
  185. .d-1of10 {
  186. @include grid-col;
  187. width: 10%;
  188. }
  189. .d-1of11 {
  190. @include grid-col;
  191. width: 9.09090909091%;
  192. }
  193. .d-1of12 {
  194. @include grid-col;
  195. width: 8.33%;
  196. }
  197. } // end desktop styles