_isotope-grid.scss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. /*--------------------------------------------------------------
  2. ## Isotope Grid
  3. --------------------------------------------------------------*/
  4. /* center container with CSS */
  5. .home .content-area,
  6. .blog .content-area {
  7. border-top: 1px solid $color__border-transparent;
  8. }
  9. /**
  10. * Disabling Isotope CSS3 transitions
  11. */
  12. .isotope.no-transition,
  13. .isotope.no-transition .isotope-item,
  14. .isotope .isotope-item.no-transition {
  15. -webkit-transition-duration: 0s;
  16. -moz-transition-duration: 0s;
  17. -ms-transition-duration: 0s;
  18. -o-transition-duration: 0s;
  19. transition-duration: 0s;
  20. }
  21. /**
  22. * Isotope
  23. */
  24. .hfeed {
  25. .site-main {
  26. display: block;
  27. margin: 0 auto ($baseline * 4);
  28. opacity: 0;
  29. overflow: visible;
  30. padding: $gutter 0;
  31. width: calc( 100% - #{($gutter)} );
  32. @include transition( opacity, .33s, ease-in );
  33. /* fluid 5 columns */
  34. .grid-sizer,
  35. .grid-item,
  36. .grid-item-featured:not(.has-post-thumbnail),
  37. .grid-item-featured.grid-item-small {
  38. width: 100%; // calc(20% - #{$gutter});
  39. }
  40. /* 2 columns wide */
  41. .grid-item--width2,
  42. .grid-item-featured {
  43. width: 100%; // calc(40% - #{$gutter * 2});
  44. }
  45. .gutter-sizer {
  46. width: 0;
  47. }
  48. }
  49. }
  50. .no-js .hfeed .site-main,
  51. .hfeed.error404 .site-main,
  52. .hfeed.search-no-results .site-main,
  53. .hfeed .site-main.has-isotope {
  54. opacity: 1;
  55. }
  56. @include breakpoint( mobileonly ) {
  57. .hfeed {
  58. .site-main {
  59. width: calc( 100% );
  60. }
  61. }
  62. }
  63. @include breakpoint( phablet ) {
  64. .hfeed {
  65. .site-main {
  66. margin: 0 auto calc(#{ $baseline * 4 } + #{ $gutter * 1.5 });
  67. /* fluid 5 columns */
  68. .grid-sizer,
  69. .grid-item,
  70. .grid-item-featured:not(.has-post-thumbnail),
  71. .grid-item-featured.grid-item-small {
  72. width: 50%;
  73. }
  74. /* 2 columns wide */
  75. .grid-item--width2,
  76. .grid-item-featured {
  77. width: 50%;
  78. }
  79. .gutter-sizer {
  80. width: 0;
  81. }
  82. }
  83. }
  84. }
  85. @include breakpoint( tablet ) {
  86. .hfeed {
  87. .site-main {
  88. /* fluid 5 columns */
  89. .grid-sizer,
  90. .grid-item,
  91. .grid-item-featured:not(.has-post-thumbnail),
  92. .grid-item-featured.grid-item-small {
  93. width: 33%;
  94. }
  95. /* 2 columns wide */
  96. .grid-item--width2,
  97. .grid-item-featured {
  98. width: 66%;
  99. }
  100. .gutter-sizer {
  101. width: 0;
  102. }
  103. }
  104. }
  105. // Archives
  106. .hfeed:not(.home):not(.blog) {
  107. .site-main {
  108. /* fluid 5 columns */
  109. .grid-sizer,
  110. .grid-item,
  111. .grid-item-featured:not(.has-post-thumbnail),
  112. .grid-item-featured.grid-item-small {
  113. width: 50%;
  114. }
  115. /* 2 columns wide */
  116. .grid-item--width2,
  117. .grid-item-featured {
  118. width: 50%;
  119. }
  120. }
  121. }
  122. }
  123. @include breakpoint(laptop) {
  124. .hfeed {
  125. .site-main {
  126. /* fluid 5 columns */
  127. .grid-sizer,
  128. .grid-item,
  129. .grid-item-featured:not(.has-post-thumbnail),
  130. .grid-item-featured.grid-item-small {
  131. width: 25%; // calc(20% - #{$gutter});
  132. }
  133. /* 2 columns wide */
  134. .grid-item--width2,
  135. .grid-item-featured {
  136. width: 50%; // calc(40% - #{$gutter * 2});
  137. }
  138. .gutter-sizer {
  139. width: 0;
  140. }
  141. }
  142. // Archives
  143. &.blog:not(.home),
  144. &:not(.home):not(.blog) {
  145. .site-main {
  146. /* fluid 5 columns */
  147. .grid-sizer,
  148. .grid-item,
  149. .grid-item-featured:not(.has-post-thumbnail),
  150. .grid-item-featured.grid-item-small {
  151. width: 33.333%;
  152. }
  153. /* 2 columns wide */
  154. .grid-item--width2,
  155. .grid-item-featured {
  156. width: 66.667%;
  157. }
  158. }
  159. }
  160. }
  161. }