diff --git a/client/scss/_globals.scss b/client/scss/_globals.scss index 013a1f9..a0d2328 100644 --- a/client/scss/_globals.scss +++ b/client/scss/_globals.scss @@ -1,5 +1,4 @@ body { - min-width: 800px; // FIXME: MOBILE font-family: $baseFont; font-weight: $baseFontRegular; @@ -66,8 +65,8 @@ body[data-platform=mac] .platform-win { display: none; } transition: max-height .15s ease-in; form { + @include boxPadding(20px, 20px); display: block; - padding: 20px $boxPadding; } .btn { diff --git a/client/scss/_mixins.scss b/client/scss/_mixins.scss index 7624601..1e4196a 100644 --- a/client/scss/_mixins.scss +++ b/client/scss/_mixins.scss @@ -1,4 +1,9 @@ +// Global padding across all first level elements +@mixin boxPadding($paddingTop: 20px, $paddingBottom: 20px) { + padding: $paddingTop $boxPadding $paddingBottom $boxPadding; +} + // Vertical dotted separtor @mixin separator($color: white, $margin: 4px) { width: 0; diff --git a/client/scss/components/_code.scss b/client/scss/components/_code.scss index ef9d670..ba3889a 100644 --- a/client/scss/components/_code.scss +++ b/client/scss/components/_code.scss @@ -8,22 +8,24 @@ h2 { margin: 0; - padding: 20px $boxPadding 20px $boxPadding; + @include boxPadding(20px, 20px); + color: $codeTextColor; font-weight: $baseFontDemiBold; font-size: 14px; } .snippet-code { + @include boxPadding(10px, 10px); + background-color: $codeDiffBgColor; - padding: 10px $boxPadding 10px $boxPadding; white-space: pre; font-size: 12px; } } .snippet-code { - padding: 20px $boxPadding; + @include boxPadding(20px, 20px); font-family: $codeFont; font-size: 13px; diff --git a/client/scss/components/_form.scss b/client/scss/components/_form.scss index 01f25e1..52c37f7 100644 --- a/client/scss/components/_form.scss +++ b/client/scss/components/_form.scss @@ -48,7 +48,8 @@ } .options { - padding: 0 $boxPadding; + @include boxPadding(0, 0); + height: 60px; display: flex; align-items: center; @@ -65,7 +66,7 @@ } .content { - padding: 20px $boxPadding; + @include boxPadding(20px, 20px); textarea { padding: 20px; diff --git a/client/scss/components/_header.scss b/client/scss/components/_header.scss index aef5f04..ccf6e69 100644 --- a/client/scss/components/_header.scss +++ b/client/scss/components/_header.scss @@ -1,5 +1,5 @@ header { - padding: 0 $boxPadding; + @include boxPadding(0, 0); height: 60px; display: flex; @@ -61,8 +61,8 @@ header { ul#snippetOptions { + @include boxPadding(0, 0); margin: 0; - padding: 0 $boxPadding; height: 40px; background-color: $metaBgColor; @@ -123,7 +123,7 @@ ul#snippetOptions { .snippet-message { - margin: 20px $boxPadding 0 $boxPadding; + @include boxPadding(20px, 0); padding: 8px 20px; max-width: 660px; diff --git a/client/scss/components/_history.scss b/client/scss/components/_history.scss index a851235..7c71ead 100644 --- a/client/scss/components/_history.scss +++ b/client/scss/components/_history.scss @@ -2,8 +2,8 @@ .history-header { + @include boxPadding(15px, 15px); margin: 0; - padding: 15px $boxPadding; color: $textColor; font-size: 14px; @@ -29,7 +29,7 @@ } .history-empty { - padding: 40px $boxPadding; + @include boxPadding(40px, 40px); color: $textColor; } diff --git a/client/scss/components/_text.scss b/client/scss/components/_text.scss index 34c5764..787d5bd 100644 --- a/client/scss/components/_text.scss +++ b/client/scss/components/_text.scss @@ -2,8 +2,7 @@ // Generic content pages such as About/404/500 // and base styles for text based lexer. article { - padding: 0 $boxPadding 40px $boxPadding; - padding-top: 30px; + @include boxPadding(30px, 40px); font-size: 16px; font-weight: $baseFontRegular; diff --git a/client/scss/dpaste.scss b/client/scss/dpaste.scss index 6cfdccc..1031b8e 100755 --- a/client/scss/dpaste.scss +++ b/client/scss/dpaste.scss @@ -73,8 +73,9 @@ $columnWidth: 60px; $columnGap: 20px; $boxPadding: 30px; // Left/Right padding of all views -$mobileBoxPadding: 20px; +$mobileBoxPadding: 10px; +$mobileBreakpoint: 600px; /* ----------------------------------------------------------------------------- Imports