From fbc1a7ce28e3e003516a3ca774b1a5baf768dee2 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Sat, 21 Mar 2020 22:01:43 +0100 Subject: [PATCH] =?UTF-8?q?Pou=C5=BEit=C3=AD=20flexboxu=20pro=20obsah?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Z důvodu správného škálování v #main v případě, že není #nav, byl použit flexbox. To by mělo zabránit ošklivým hackům pomocí @media. --- sass/_media.scss | 9 ++++----- sass/style.scss | 6 +++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sass/_media.scss b/sass/_media.scss index a4270d6..b3547f4 100644 --- a/sass/_media.scss +++ b/sass/_media.scss @@ -1,13 +1,12 @@ @media only screen and (max-width: 700px) { + #content { + flex-direction: column; + } + #nav { border: 0; border-bottom: 1px dotted #ccc; - margin-bottom: 1em; width: 100%; } - - #main { - margin-left: 0; - } } diff --git a/sass/style.scss b/sass/style.scss index 9af7a41..7ee344f 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -53,6 +53,10 @@ body { } } +#content { + display: flex; +} + #nav { float: left; border-right: 1px dotted #ccc; @@ -73,7 +77,7 @@ body { #main { padding: 1.5em; - margin-left: 200px; + flex-grow: 1; .title { font-size: 1.2em;