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: Implement .cards class, Fix alignment inn group-5, Minor fixes Created June 21, 2017, 7:41 a.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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 width: 100%; 274 width: 100%;
275 } 275 }
276 // un-center all cards 276 // un-center all cards
277 .group > div:nth-child(4), 277 .group > div:nth-child(4),
278 .group > div:nth-child(3), 278 .group > div:nth-child(3),
279 .group > div:nth-child(5) 279 .group > div:nth-child(5)
280 { 280 {
281 margin-left: 0; 281 margin-left: 0;
282 } 282 }
283 } 283 }
284
285 @supports (display: grid)
286 {
287
288 .group.cards
ire 2017/06/21 07:47:58 I opted for `.group.cards` instead of just `.cards
289 {
290 display: grid;
291 grid-template-columns: repeat(1, 1fr);
292
293 @media (min-width: $card-min-width)
294 {
295 // Each card should be a minimum width of the $card-min-width. Otherwise, take up available space
296 grid-template-columns: repeat(auto-fit, minmax($card-min-width, 1fr));
297 }
298 }
299
300 .group.cards .card
301 {
302 display: inline-grid;
303 width: 100%;
304 grid-template-rows: auto 1fr auto;
305 }
306
307 .group.cards .card-summary
308 {
309 @media all
310 {
311 height: auto;
312 }
313 }
314
315 .group-4.cards
316 {
317 @media (min-width: $desktop-breakpoint)
318 {
319 // Each card should take a minimum of 25% width of the group
320 grid-template-columns: repeat(auto-fit, minmax(25%, 1fr));
321 }
322 }
323
324 .group-5.cards
325 {
326 @media (min-width: $tablet-breakpoint)
327 {
328 grid-template-columns: repeat(auto-fit, minmax(33.3%, 1fr));
329 }
330 @media (min-width: $desktop-breakpoint)
331 {
332 grid-template-columns: repeat(auto-fit, minmax(20%, 1fr));
333 }
334 }
335
336 .group-5.cards > div:nth-child(4),
337 .group-5.cards > div:nth-child(5)
338 {
339 @media all
340 {
341 margin-left: 0;
342 }
343 }
344
345 .group-5.cards > div:nth-child(4)
346 {
347 @media (min-width: $tablet-breakpoint) and (max-width: $desktop-breakpoint)
348 {
349 margin-left: 50%;
350 }
351 }
352
353 .group-5.cards > div:nth-child(5)
354 {
355 @media (min-width: 700px) and (max-width: $desktop-breakpoint)
ire 2017/06/21 07:47:58 I had to use 700px here instead of a variables bec
356 {
357 margin-left: 50%;
358 }
359 }
360
361 }
OLDNEW
« static/scss/_variables.scss ('K') | « static/scss/components/_cards.scss ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld