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: Restructure card markup and fixes Created June 13, 2017, 4:44 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,50 @@
// 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 .card
+ {
+ display: inline-grid;
+ }
+
+ .group-4
+ {
+ @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
juliandoucette 2017/06/16 19:39:17 I'm not sure how/why yet - but this patchset seems
ire 2017/06/21 07:47:58 I've fixed the centering of the last card in 5 car
+ {
+ @media (min-width: $desktop-breakpoint)
+ {
+ grid-template-columns: repeat(auto-fit, minmax(20%, 1fr));
+ }
+ }
+
+ .group-5 > div:nth-child(4)
ire 2017/06/13 16:51:23 Since this is overwriting a previous style, I stuc
juliandoucette 2017/06/16 19:39:17 Acknowledged.
+ {
+ @media all
juliandoucette 2017/06/16 19:39:17 Why @media all?
ire 2017/06/21 07:47:58 See comment above
+ {
+ margin-left: 0;
+ }
+ }
+
+}
« 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