| Index: static/scss/components/_groups.scss |
| =================================================================== |
| --- a/static/scss/components/_groups.scss |
| +++ b/static/scss/components/_groups.scss |
| @@ -294,8 +294,79 @@ |
| // un-center all cards |
| .group > div:nth-child(4), |
| .group > div:nth-child(3), |
| .group > div:nth-child(5) |
| { |
| margin-left: 0; |
| } |
| } |
| + |
| +@supports (display: grid) |
| +{ |
| + |
| + .group.cards |
| + { |
| + display: grid; |
| + grid-template-columns: repeat(1, 1fr); |
| + |
| + @media (min-width: $card-min-width) |
| + { |
| + // Each card should be a minimum width of the $card-min-width. Otherwise, take up available space |
| + grid-template-columns: repeat(auto-fit, minmax($card-min-width, 1fr)); |
| + } |
| + } |
| + |
| + .group.cards .card |
| + { |
| + display: inline-grid; |
| + width: 100%; |
| + grid-template-rows: auto 1fr auto; |
| + } |
| + |
| + .group.cards .card-summary |
| + { |
| + height: auto; |
| + } |
| + |
| + .group-4.cards |
| + { |
| + @media (min-width: $desktop-breakpoint) |
| + { |
| + // Each card should take a minimum of 25% width of the group |
| + grid-template-columns: repeat(auto-fit, minmax(25%, 1fr)); |
| + } |
| + } |
| + |
| + .group-5.cards |
| + { |
| + @media (min-width: $tablet-breakpoint) |
| + { |
| + grid-template-columns: repeat(auto-fit, minmax(33.3%, 1fr)); |
| + } |
| + @media (min-width: $desktop-breakpoint) |
| + { |
| + grid-template-columns: repeat(auto-fit, minmax(20%, 1fr)); |
| + } |
| + } |
| + |
| + .group-5.cards > div:nth-child(4), |
| + .group-5.cards > div:nth-child(5) |
| + { |
| + margin-left: 0; |
| + } |
| + |
| + .group-5.cards > div:nth-child(4) |
| + { |
| + @media (min-width: $tablet-breakpoint) and (max-width: $desktop-breakpoint - 1px) |
| + { |
| + margin-left: 50%; |
| + } |
| + } |
| + |
| + .group-5.cards > div:nth-child(5) |
| + { |
| + @media (min-width: 700px) and (max-width: $desktop-breakpoint - 1px) |
| + { |
| + margin-left: 50%; |
| + } |
| + } |
| +} |