From 76a09347a15ae3152b612f72b58b5a4ab5c42c3b Mon Sep 17 00:00:00 2001 From: Dzmitry Shulhin Date: Tue, 24 Jul 2018 13:35:38 +0300 Subject: [PATCH 1/5] media prop for table --- scss/_tables.scss | 57 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/scss/_tables.scss b/scss/_tables.scss index 00a21f2..96dac5a 100644 --- a/scss/_tables.scss +++ b/scss/_tables.scss @@ -22,25 +22,62 @@ @import 'defs'; +@media only screen and (max-width: 760px), (min-width: 768px) and (max-width: 1024px) { + table, + tbody, + th, + td, + tr { + display: block; + } + thead { + display: contents; + } + thead tr { + background-color: lighten($gray, 15); + } + + tr { + border: 1px solid #ccc; + margin-bottom: .5rem; + } + + td { + border: none; + border-bottom: 1px solid #eee; + position: relative; + padding-left: 50%; + } + + td:before { + position: absolute; + top: 6px; + left: 6px; + width: 45%; + padding-right: 10px; + white-space: nowrap; + } +} + th { - font-weight: 600; + font-weight: 600; } td, th { - border-bottom: (.06 * $em) solid $gray; - overflow: auto; - padding: .825 * $em $em; - text-align: left; - vertical-align: top; + border-bottom: (.06 * $em) solid $gray; + overflow: auto; + padding: .825 * $em $em; + text-align: left; + vertical-align: top; } thead th { - border-bottom-width: .12 * $em; - padding-bottom: .35 * $em; + border-bottom-width: .12 * $em; + padding-bottom: .35 * $em; } table { - display: table; - overflow-x: auto; + display: table; + overflow-x: auto; } From a3050e7147c4f22ddd3edd2ffebda13e0a81e10e Mon Sep 17 00:00:00 2001 From: teriyakigod2 Date: Tue, 24 Jul 2018 14:16:31 +0300 Subject: [PATCH 2/5] media props in _table.scss --- scss/_tables.scss | 83 ++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/scss/_tables.scss b/scss/_tables.scss index 96dac5a..4264ac8 100644 --- a/scss/_tables.scss +++ b/scss/_tables.scss @@ -23,61 +23,62 @@ @import 'defs'; @media only screen and (max-width: 760px), (min-width: 768px) and (max-width: 1024px) { - table, - tbody, - th, - td, - tr { - display: block; - } - thead { - display: contents; - } - thead tr { - background-color: lighten($gray, 15); - } + table, + tbody, + th, + td, + tr { + display: block; + } - tr { - border: 1px solid #ccc; - margin-bottom: .5rem; - } + thead { + display: contents; + } - td { - border: none; - border-bottom: 1px solid #eee; - position: relative; - padding-left: 50%; - } + thead tr { + background-color: lighten($gray, 15); + } - td:before { - position: absolute; - top: 6px; - left: 6px; - width: 45%; - padding-right: 10px; - white-space: nowrap; - } + tr { + border: 1px solid $gray; + margin-bottom: .5rem; + } + + td { + border: 0; + padding-left: 50%; + position: relative; + } + + td::before { + left: 6px; + padding-right: 10px; + position: absolute; + top: 6px; + white-space: nowrap; + width: 45%; + } } th { - font-weight: 600; + font-weight: 600; } td, th { - border-bottom: (.06 * $em) solid $gray; - overflow: auto; - padding: .825 * $em $em; - text-align: left; - vertical-align: top; + border-bottom: (.06 * $em) solid $gray; + overflow: auto; + padding: .825 * $em $em; + text-align: left; + vertical-align: top; } thead th { - border-bottom-width: .12 * $em; - padding-bottom: .35 * $em; + border-bottom-width: .12 * $em; + padding-bottom: .35 * $em; } table { - display: table; - overflow-x: auto; + display: table; + overflow-x: auto; } From 652e02f5effd5a284dd88768c4ce8fbad9f35748 Mon Sep 17 00:00:00 2001 From: Dzmitry Shulhin Date: Mon, 30 Jul 2018 12:23:09 +0300 Subject: [PATCH 3/5] no borders && inline-block were added --- scss/_tables.scss | 80 +++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 44 deletions(-) diff --git a/scss/_tables.scss b/scss/_tables.scss index 96dac5a..192dad5 100644 --- a/scss/_tables.scss +++ b/scss/_tables.scss @@ -23,61 +23,53 @@ @import 'defs'; @media only screen and (max-width: 760px), (min-width: 768px) and (max-width: 1024px) { - table, - tbody, - th, - td, - tr { - display: block; - } - thead { - display: contents; - } - thead tr { - background-color: lighten($gray, 15); - } + table, + tbody, + th, + td, + tr { + display: block; + } - tr { - border: 1px solid #ccc; - margin-bottom: .5rem; - } + thead { + display: none; + } - td { - border: none; - border-bottom: 1px solid #eee; - position: relative; - padding-left: 50%; - } + tr { + display: inline-block; + margin-bottom: .5rem; + } - td:before { - position: absolute; - top: 6px; - left: 6px; - width: 45%; - padding-right: 10px; - white-space: nowrap; - } + body td { + border: 0; + display: inline-block; + position: relative; + } + + td::before { + left: 6px; + padding-right: 10px; + position: absolute; + top: 6px; + white-space: nowrap; + width: 45%; + } } th { - font-weight: 600; + font-weight: 600; } td, th { - border-bottom: (.06 * $em) solid $gray; - overflow: auto; - padding: .825 * $em $em; - text-align: left; - vertical-align: top; -} - -thead th { - border-bottom-width: .12 * $em; - padding-bottom: .35 * $em; + border-bottom: (.06 * $em) solid $gray; + overflow: auto; + padding: .825 * $em $em; + text-align: left; + vertical-align: top; } table { - display: table; - overflow-x: auto; + display: table; + overflow-x: auto; } From 434984af1317458d3fd329beaacd8f7174db89a3 Mon Sep 17 00:00:00 2001 From: teriyakigod2 Date: Wed, 30 Jan 2019 01:39:34 +0300 Subject: [PATCH 4/5] Move plain text 'Your age' to