From 11ba7574312269e67f190c58b72cf505ff360314 Mon Sep 17 00:00:00 2001 From: Samuel Meuli Date: Fri, 20 Dec 2019 13:58:48 +0100 Subject: [PATCH] Improve editor bottom padding --- .../assets/styles/components/_editor.scss | 36 +++++++++++++++---- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/src/renderer/assets/styles/components/_editor.scss b/src/renderer/assets/styles/components/_editor.scss index 5d0566ab..1623ba3a 100644 --- a/src/renderer/assets/styles/components/_editor.scss +++ b/src/renderer/assets/styles/components/_editor.scss @@ -13,13 +13,13 @@ overflow-y: auto; @media (max-width: $screen-desktop) { - padding: 1.25 * $spacing-abs-large (1.25 * $spacing-abs-large + $editor-buttons-width) 1.25 * - $spacing-abs-large 1.25 * $spacing-abs-large; + padding: 1.25 * $spacing-abs-large (1.25 * $spacing-abs-large + $editor-buttons-width) 0 1.25 * + $spacing-abs-large; } @media (min-width: $screen-desktop + 1px) { - padding: (2 * $spacing-abs-large) (2 * $spacing-abs-large + $editor-buttons-width) - (2 * $spacing-abs-large) (2 * $spacing-abs-large); + padding: (2 * $spacing-abs-large) (2 * $spacing-abs-large + $editor-buttons-width) 0 + (2 * $spacing-abs-large); } } @@ -44,14 +44,36 @@ // stylelint-disable selector-class-pattern +// Fill editor height (and compensate for paragraph spacing between the title and text) .DraftEditor-root { - height: 100% !important; // stylelint-disable-line declaration-no-important + height: calc(100% - 1rem) !important; // stylelint-disable-line declaration-no-important } +// Fill editor height +.DraftEditor-editorContainer { + height: 100%; +} + +// Placeholder text .public-DraftEditorPlaceholder-inner { @include color("text-placeholder"); } -.editor-text-wrapper .public-DraftStyleDefault-block { - margin-top: $paragraph-spacing; +// Text editor +.editor-text-wrapper { + // Spacing + .DraftEditor-root { + @media (max-width: $screen-desktop) { + padding-bottom: 1.25 * $spacing-abs-large; + } + + @media (min-width: $screen-desktop + 1px) { + padding-bottom: 2 * $spacing-abs-large; + } + } + + // Paragraph spacing + .public-DraftStyleDefault-block { + margin-top: $paragraph-spacing; + } }