From b24994abf7de1a1787f0e71ad25c4d001e0ce5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 1 Aug 2021 23:07:46 +0200 Subject: [PATCH] Fix styles in draft version body There were no elements matching this selector since commit d679c1eb7 and these styles were completely ignored. I'm re-adding the ones with make sense in my humble opinion. I'm not adding top and bottom paddings since they affect the way the height of the element is calculated, and am not sure about the intention behind setting the height property. --- app/assets/stylesheets/admin.scss | 26 +++++-------------- .../legislation/draft_versions/_form.html.erb | 3 ++- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index c6e72a248..41089dbe1 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -978,17 +978,6 @@ table { } } - .legislation-draft-version-body { - font-family: $font-family-serif; - background: #f5f5f5; - height: 16em; - - &:focus { - border: 1px solid #cacaca; - box-shadow: inset 0 1px 2px rgba(34, 34, 34, 0.1); - } - } - .markdown-preview { font-family: $font-family-serif; border: 1px solid #cacaca; @@ -1032,11 +1021,14 @@ table { .legislation-draft-version-body { border-radius: 0; - padding: 1rem; - border: 0; @include breakpoint(medium) { - padding: 1rem 2rem; + padding-left: 2rem; + padding-right: 2rem; + } + + &:focus { + box-shadow: inset 0 1px 2px rgba(34, 34, 34, 0.1); } } @@ -1051,12 +1043,6 @@ table { } } -.legislation-draft-version-body { - &:focus { - border: 0; - } -} - // 09. Map // -------------- diff --git a/app/views/admin/legislation/draft_versions/_form.html.erb b/app/views/admin/legislation/draft_versions/_form.html.erb index 3c3fb1d1f..dd462837d 100644 --- a/app/views/admin/legislation/draft_versions/_form.html.erb +++ b/app/views/admin/legislation/draft_versions/_form.html.erb @@ -50,7 +50,8 @@
- <%= translations_form.text_area :body, label: false, rows: 10 %> + <%= translations_form.text_area :body, label: false, rows: 10, + class: "legislation-draft-version-body" %>