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: Created June 1, 2017, 1:10 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
« static/scss/components/_cards.scss ('K') | « static/scss/components/_cards.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
@@ -276,8 +276,33 @@
// 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
+ {
+ display: grid;
+ // Each card should be a minimum width of the $card--max-width. Otherwise, take up available space
+ grid-template-columns: repeat(auto-fit, minmax($card--max-width, 1fr));
+ }
+
+ .group-4
ire 2017/06/01 13:14:35 I haven't dealt with other group sizes yet (e.g. g
juliandoucette 2017/06/09 14:51:12 Acknowledged.
+ {
+ @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-4 > div
juliandoucette 2017/06/09 14:51:12 NIT: I'm guessing that you are following the exist
ire 2017/06/12 14:28:54 Acknowledged.
+ {
+ width: 100%;
+ }
+
+}
« static/scss/components/_cards.scss ('K') | « static/scss/components/_cards.scss ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld