_matrix.css.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /*------------------------------------*\
  2. $MATRIX
  3. \*------------------------------------*/
  4. /**
  5. * Create a grid of items out of a single list, e.g.:
  6. *
  7. <ul class="matrix three-cols">
  8. <li class=all-cols>Lorem</li>
  9. <li>Ipsum <a href=#>dolor</a></li>
  10. <li><a href=# class=matrix__link>Sit</a></li>
  11. <li>Amet</li>
  12. <li class=all-cols>Consectetuer</li>
  13. </ul>
  14. *
  15. * Extend this object in your theme stylesheet.
  16. *
  17. * Demo: jsfiddle.net/inuitcss/Y2zrU
  18. *
  19. */
  20. .matrix{
  21. @extend .block-list;
  22. border-left-width:1px;
  23. @extend .cf;
  24. > li{
  25. float:left;
  26. border-right-width:1px;
  27. }
  28. }
  29. .matrix__link{
  30. @extend .block-list__link;
  31. }
  32. /**
  33. * The `.multi-list` object is a lot like the `.matrix` object only without the
  34. * blocky borders and padding.
  35. *
  36. <ul class="multi-list four-cols">
  37. <li>Lorem</li>
  38. <li>Ipsum</li>
  39. <li>Dolor</li>
  40. <li>Sit</li>
  41. </ul>
  42. *
  43. * Demo: jsfiddle.net/inuitcss/Y2zrU
  44. *
  45. */
  46. .multi-list{
  47. list-style:none;
  48. margin-left:0;
  49. @extend .cf;
  50. }
  51. .multi-list > li{
  52. float:left;
  53. }
  54. /**
  55. * Apply these classes alongside the `.matrix` or `.multi-list` classes on
  56. * lists to determine how wide their columns are.
  57. */
  58. .two-cols > li{
  59. width:50%;
  60. }
  61. .three-cols > li{
  62. width:33.333%;
  63. }
  64. .four-cols > li{
  65. width:25%;
  66. }
  67. .five-cols > li{
  68. width:20%;
  69. }
  70. /**
  71. * Unfortunately we have to qualify this selector in order to bring its
  72. * specificity above the `.[number]-cols > li` selectors above.
  73. */
  74. .matrix > .all-cols,
  75. .multi-list > .all-cols{
  76. width:100%;
  77. }
  78. /*------------------------------------*\
  79. $MATRIX
  80. \*------------------------------------*/
  81. /**
  82. * Create a grid of items out of a single list, e.g.:
  83. *
  84. <ul class="matrix three-cols">
  85. <li class=all-cols>Lorem</li>
  86. <li>Ipsum <a href=#>dolor</a></li>
  87. <li><a href=# class=matrix__link>Sit</a></li>
  88. <li>Amet</li>
  89. <li class=all-cols>Consectetuer</li>
  90. </ul>
  91. *
  92. * Extend this object in your theme stylesheet.
  93. *
  94. * Demo: jsfiddle.net/inuitcss/Y2zrU
  95. *
  96. */
  97. .matrix{
  98. border-left-width:1px;
  99. @extend .cf;
  100. > li{
  101. float:left;
  102. border-right-width:1px;
  103. }
  104. }
  105. /**
  106. * The `.multi-list` object is a lot like the `.matrix` object only without the
  107. * blocky borders and padding.
  108. *
  109. <ul class="multi-list four-cols">
  110. <li>Lorem</li>
  111. <li>Ipsum</li>
  112. <li>Dolor</li>
  113. <li>Sit</li>
  114. </ul>
  115. *
  116. * Demo: jsfiddle.net/inuitcss/Y2zrU
  117. *
  118. */
  119. .multi-list{
  120. list-style:none;
  121. margin-left:0;
  122. @extend .cf;
  123. }
  124. .multi-list > li{
  125. float:left;
  126. }
  127. /**
  128. * Apply these classes alongside the `.matrix` or `.multi-list` classes on
  129. * lists to determine how wide their columns are.
  130. */
  131. .two-cols > li{
  132. width:50%;
  133. }
  134. .three-cols > li{
  135. width:33.333%;
  136. }
  137. .four-cols > li{
  138. width:25%;
  139. }
  140. .five-cols > li{
  141. width:20%;
  142. }
  143. /**
  144. * Unfortunately we have to qualify this selector in order to bring its
  145. * specificity above the `.[number]-cols > li` selectors above.
  146. */
  147. .matrix > .all-cols,
  148. .multi-list > .all-cols{
  149. width:100%;
  150. }