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

Side by Side 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: Rebase Created July 17, 2017, 1:41 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This file is part of acceptableads.org. 1 // This file is part of acceptableads.org.
2 // Copyright (C) 2016 Eyeo GmbH 2 // Copyright (C) 2016 Eyeo GmbH
3 // 3 //
4 // acceptableads.org is free software: you can redistribute it and/or modify 4 // acceptableads.org is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by 5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or 6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version. 7 // (at your option) any later version.
8 // 8 //
9 // acceptableads.org is distributed in the hope that it will be useful, 9 // acceptableads.org is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 width: 100%; 292 width: 100%;
293 } 293 }
294 // un-center all cards 294 // un-center all cards
295 .group > div:nth-child(4), 295 .group > div:nth-child(4),
296 .group > div:nth-child(3), 296 .group > div:nth-child(3),
297 .group > div:nth-child(5) 297 .group > div:nth-child(5)
298 { 298 {
299 margin-left: 0; 299 margin-left: 0;
300 } 300 }
301 } 301 }
302
303 @supports (display: grid)
juliandoucette 2017/07/18 22:07:36 Something funky seems to be going on at 992px wide
ire 2017/07/20 17:43:25 Done.
304 {
305
306 .group.cards
307 {
308 display: grid;
309 grid-template-columns: repeat(1, 1fr);
310
311 @media (min-width: $card-min-width)
312 {
313 // Each card should be a minimum width of the $card-min-width. Otherwise, take up available space
314 grid-template-columns: repeat(auto-fit, minmax($card-min-width, 1fr));
315 }
316 }
317
318 .group.cards .card
319 {
320 display: inline-grid;
321 width: 100%;
322 grid-template-rows: auto 1fr auto;
323 }
324
325 .group.cards .card-summary
326 {
327 @media all
juliandoucette 2017/07/18 22:07:36 NIT: `@media all` doesn't seem to make a differenc
ire 2017/07/20 17:43:25 Yep you're right :p . Done.
328 {
329 height: auto;
330 }
331 }
332
333 .group-4.cards
334 {
335 @media (min-width: $desktop-breakpoint)
336 {
337 // Each card should take a minimum of 25% width of the group
338 grid-template-columns: repeat(auto-fit, minmax(25%, 1fr));
339 }
340 }
341
342 .group-5.cards
343 {
344 @media (min-width: $tablet-breakpoint)
345 {
346 grid-template-columns: repeat(auto-fit, minmax(33.3%, 1fr));
347 }
348 @media (min-width: $desktop-breakpoint)
349 {
350 grid-template-columns: repeat(auto-fit, minmax(20%, 1fr));
351 }
352 }
353
354 .group-5.cards > div:nth-child(4),
355 .group-5.cards > div:nth-child(5)
356 {
357 @media all
358 {
359 margin-left: 0;
360 }
361 }
362
363 .group-5.cards > div:nth-child(4)
364 {
365 @media (min-width: $tablet-breakpoint) and (max-width: $desktop-breakpoint)
366 {
367 margin-left: 50%;
368 }
369 }
370
371 .group-5.cards > div:nth-child(5)
372 {
373 @media (min-width: 700px) and (max-width: $desktop-breakpoint)
374 {
375 margin-left: 50%;
376 }
377 }
378
379 }
OLDNEW
« 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