From d7e38d2be88473bb98e9bf0ed3078021ec779658 Mon Sep 17 00:00:00 2001 From: Kris Date: Mon, 5 Nov 2018 12:51:26 -0500 Subject: [PATCH] Adding IE11 Grid support for admin dashboard --- .../common/admin/admin_report_counters.scss | 24 ++++++++ .../common/admin/dashboard_next.scss | 57 ++++++++++++++++++- 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/common/admin/admin_report_counters.scss b/app/assets/stylesheets/common/admin/admin_report_counters.scss index 546a0e4c66a..c9a8ef9df48 100644 --- a/app/assets/stylesheets/common/admin/admin_report_counters.scss +++ b/app/assets/stylesheets/common/admin/admin_report_counters.scss @@ -6,6 +6,30 @@ grid-template-rows: repeat(auto-fit, minmax(32px, 1fr)); align-items: center; + // IE11 grid support + display: -ms-grid; + -ms-grid-columns: 2fr 1fr 1fr 1fr 1fr; + .cell { + -ms-grid-row: 1; + -ms-grid-column-span: 1; + + &:nth-of-type(1) { + -ms-grid-column: 1; + } + &:nth-of-type(2) { + -ms-grid-column: 2; + } + &:nth-of-type(3) { + -ms-grid-column: 3; + } + &:nth-of-type(4) { + -ms-grid-column: 4; + } + &:nth-of-type(5) { + -ms-grid-column: 5; + } + } + .cell { padding: 0.25em; text-align: right; diff --git a/app/assets/stylesheets/common/admin/dashboard_next.scss b/app/assets/stylesheets/common/admin/dashboard_next.scss index 4b6167cbbbd..db101eb4317 100644 --- a/app/assets/stylesheets/common/admin/dashboard_next.scss +++ b/app/assets/stylesheets/common/admin/dashboard_next.scss @@ -130,6 +130,38 @@ grid-column-gap: 1em; grid-row-gap: 1em; + // IE11 grid support + display: -ms-grid; + -ms-grid-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + -ms-grid-rows: 1fr 1fr; + .admin-report { + -ms-grid-column-span: 4; + &:nth-of-type(1) { + -ms-grid-row: 1; + -ms-grid-column: 1; + } + &:nth-of-type(2) { + -ms-grid-row: 1; + -ms-grid-column: 5; + } + &:nth-of-type(3) { + -ms-grid-row: 1; + -ms-grid-column: 9; + } + &:nth-of-type(4) { + -ms-grid-row: 2; + -ms-grid-column: 1; + } + &:nth-of-type(5) { + -ms-grid-row: 2; + -ms-grid-column: 5; + } + &:nth-of-type(6) { + -ms-grid-row: 2; + -ms-grid-column: 9; + } + } + .admin-report { grid-column: span 4; } @@ -255,7 +287,7 @@ .counters-header { display: grid; - flex: 1; + flex: 1 0 auto; grid-template-columns: 33% repeat(auto-fit, minmax(20px, 1fr)); border: 1px solid $primary-low; border-bottom: 0; @@ -263,6 +295,29 @@ text-align: right; align-items: center; padding: 0.65em 0.25em; + + // IE11 grid support + display: -ms-grid; + -ms-grid-columns: 2fr 1fr 1fr 1fr 1fr; + .counters-cell { + -ms-grid-row: 1; + -ms-grid-column-span: 1; + &:nth-of-type(1) { + -ms-grid-column: 1; + } + &:nth-of-type(2) { + -ms-grid-column: 2; + } + &:nth-of-type(3) { + -ms-grid-column: 3; + } + &:nth-of-type(4) { + -ms-grid-column: 4; + } + &:nth-of-type(5) { + -ms-grid-column: 5; + } + } } .admin-report .main {