Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: static/scss/components/_groups.scss

Issue 29453600: Issue 4961 - Fix card group field alignment on acceptableads.com (Closed) Base URL: https://hg.adblockplus.org/web.acceptableads.com
Patch Set: Move styling for cards on committee page to committee/index.html Created July 25, 2017, 1:33 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « static/scss/_variables.scss ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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%;
+ }
+ }
+}
« no previous file with comments | « static/scss/_variables.scss ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld