From 59bdf5309fb6faff13cd787b1478c208fd74857d Mon Sep 17 00:00:00 2001 From: silviyaboteva Date: Tue, 21 Apr 2020 19:14:11 +0300 Subject: [PATCH] wip: add responsive styles on dashboard page --- src/pages/Dashboard.jsx | 2 +- src/styles/_common.scss | 75 ++++++++++++++++++++++++++++++++++------- 2 files changed, 63 insertions(+), 14 deletions(-) diff --git a/src/pages/Dashboard.jsx b/src/pages/Dashboard.jsx index b0eb59c..00b5aba 100644 --- a/src/pages/Dashboard.jsx +++ b/src/pages/Dashboard.jsx @@ -215,7 +215,7 @@ const Dashboard = () => {
- setData(data)}> + setData(data)}> diff --git a/src/styles/_common.scss b/src/styles/_common.scss index a091900..62362bd 100644 --- a/src/styles/_common.scss +++ b/src/styles/_common.scss @@ -73,50 +73,102 @@ li { .card-container { background-color: $white; + padding: 40px 0; + text-align: center; &.grid { display: grid; - grid-template-columns: repeat(3, 1fr); + grid-template-columns: repeat(1, 1fr); column-gap: 10px; row-gap: 1em; } - .card-buttons { - text-align: center; + .card-title { + } + + .card-buttons { .k-button { width: 105px; } } .card-ranges { - text-align: right; - .k-daterangepicker { .k-textbox-container, .k-floating-label-container { padding-top: 0; + width: 105px; } .k-label { - display: none;; + display: none; } } } .card-component { - grid-column-start: 1; - grid-column-end: -1; + grid-column: 1 / -1; } } -@media (min-width: 480px) { } +@media (min-width: 480px) { + .card-container { + text-align: initial; + padding: 30px; + + &.grid { + grid-template-columns: repeat(2, 1fr); + } + + .card-title { + grid-column: 1 / 2; + grid-row: 1; + } + + .card-buttons { + text-align: center; + grid-column: 1 / -1; + grid-row: 2; + } + + .card-ranges { + text-align: right; + grid-column: 2 / 3; + grid-row: 1; + } + } + + } @media (min-width: 768px) { .card-container { - padding: 30px; margin: 25px; border-radius: 5px; box-shadow: 0 0 10px rgba(0,0,0,.2); + + &.grid { + grid-template-columns: repeat(3, 1fr); + } + + .card-title { + + } + + .card-buttons { + text-align: center; + grid-column: 2 / 3; + grid-row: 1; + } + + .card-ranges { + text-align: right; + grid-column: 3 / 4; + } + + .card-component { + grid-column-start: 1; + grid-column-end: -1; + } } } @@ -202,9 +254,6 @@ li { // Profile page .profile-page { - .k-form { - padding: 40px 0; - } .k-form .k-form-field { display: block;