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

Unified Diff: css/main.css

Issue 29442559: [Demo] Issue 4961 - Fix card group field alignment on acceptableads.com (Closed)
Patch Set: Created May 19, 2017, 5:30 a.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 | « no previous file | gulpfile.js » ('j') | scss/main.scss » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: css/main.css
===================================================================
new file mode 100644
--- /dev/null
+++ b/css/main.css
@@ -0,0 +1,78 @@
+* {
+ box-sizing: border-box; }
+
+body {
+ background: grey;
+ padding: 0;
+ margin: 0; }
+
+h2 {
+ font-size: 30px; }
+
+p {
+ margin: 0 0 10px;
+ padding: 0; }
+
+.card-group {
+ padding: 30px; }
+
+.card {
+ background: #fff;
+ border: 1px solid black; }
+
+.card__header {
+ height: 100px;
+ margin-bottom: 20px;
+ border: 2px solid plum; }
+
+.card__content {
+ border: 2px solid cornflowerblue; }
+
+.card__footer {
+ border: 2px solid lightcoral; }
+
+/* Table Layout Fallback
+ * Note - requires a set height for the .card__footer
+ */
+.card-group {
+ display: table; }
+
+.card {
+ display: table-cell;
+ position: relative;
+ width: 100%; }
+ @media (min-width: 600px) {
+ .card {
+ width: 50%; } }
+ @media (min-width: 800px) {
+ .card {
+ width: 33%; } }
+
+.card__content {
+ margin-bottom: 50px; }
+
+.card__footer {
+ height: 30px;
+ width: 100%;
+ position: absolute;
+ left: 0;
+ bottom: 0; }
+
+/* Grid Layout Enhancement
+ *
+ */
+@supports (display: grid) {
+ .card-group {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
+ .card {
+ display: inline-grid;
+ grid-template-rows: minmax(100px, auto) 1fr auto; }
+ @media all {
+ .card {
+ width: 100%; } }
+ .card__content {
+ margin-bottom: 20px; }
+ .card__footer {
+ position: relative;
+ height: auto; } }
« no previous file with comments | « no previous file | gulpfile.js » ('j') | scss/main.scss » ('J')

Powered by Google App Engine
This is Rietveld