From b04030b7ff0a7b858c387c021984f4fae9138c0f Mon Sep 17 00:00:00 2001 From: Amaia Castro Date: Fri, 20 Jan 2017 12:32:23 +0100 Subject: [PATCH 1/2] Sync scroll in markdown editor --- app/assets/javascripts/markdown_editor.js.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/markdown_editor.js.coffee b/app/assets/javascripts/markdown_editor.js.coffee index 121f74ce4..7617c5004 100644 --- a/app/assets/javascripts/markdown_editor.js.coffee +++ b/app/assets/javascripts/markdown_editor.js.coffee @@ -20,6 +20,9 @@ App.MarkdownEditor = $('.legislation-draft-versions-edit .warning').show() return + $(this).find('textarea').on 'scroll', -> + $('#markdown-preview').scrollTop($(this).scrollTop()) + $(this).find('.fullscreen-toggle').on 'click', -> $('.markdown-editor').toggleClass('fullscreen') From 7ce2d2802b5cceff47eb515c4b459ca368b0553c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Gonz=C3=A1lez?= Date: Mon, 23 Jan 2017 12:13:32 +0100 Subject: [PATCH 2/2] Same styles on editor and preview --- app/assets/stylesheets/admin.scss | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 8ab9f8e9b..807a202d5 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -630,7 +630,7 @@ table.investment-projects-summary { } #legislation_draft_version_body { - font-family: $font-family-monospace; + font-family: $font-family-serif; background: #f5f5f5; height: 16em; @@ -647,10 +647,14 @@ table.investment-projects-summary { h1, h2, h3, h4, h5, h6 { font-family: $font-family-serif !important; + font-size: 1rem; + line-height: 1.625rem; + margin-bottom: 0; } - h2 { - border-bottom: 1px solid $text-medium; + p { + font-size: 1rem; + line-height: 1.625rem; } }