From 8ee2529bc1476c4393e876fe2cc7735b5e61ea5d Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Sat, 6 Jun 2015 00:09:47 +0100 Subject: [PATCH] only direct children of streamfield should be made full-width/borderless --- .../scss/layouts/page-editor.scss | 21 ++++++++++++------- .../block_forms/sequence_member.html | 2 +- .../block_forms/stream_member.html | 2 ++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/wagtail/wagtailadmin/static_src/wagtailadmin/scss/layouts/page-editor.scss b/wagtail/wagtailadmin/static_src/wagtailadmin/scss/layouts/page-editor.scss index 52ed14c621..36a8529129 100644 --- a/wagtail/wagtailadmin/static_src/wagtailadmin/scss/layouts/page-editor.scss +++ b/wagtail/wagtailadmin/static_src/wagtailadmin/scss/layouts/page-editor.scss @@ -284,13 +284,6 @@ display:none; } - .widget-text_input input, .richtext, textarea{ - border:0; - padding:0; - background-color:transparent; - max-width:1024px; - } - .widget-admin_image_chooser{ label{ display:none; @@ -322,6 +315,20 @@ } } } + + /* + Text inputs, rich text fields and textareas that are direct children of streamfield + should be borderless and full-width + */ + .stream-member-inner > .widget-text_input > .field-content > .input > input, + .stream-member-inner > .field > .field-content > .input > .richtext, + .stream-member-inner > .field > .field-content > .input > textarea{ + border:0; + padding:0; + background-color:transparent; + max-width:1024px; + } + } /* Object controls */ diff --git a/wagtail/wagtailadmin/templates/wagtailadmin/block_forms/sequence_member.html b/wagtail/wagtailadmin/templates/wagtailadmin/block_forms/sequence_member.html index 1d9a44566b..6e914fcdfa 100644 --- a/wagtail/wagtailadmin/templates/wagtailadmin/block_forms/sequence_member.html +++ b/wagtail/wagtailadmin/templates/wagtailadmin/block_forms/sequence_member.html @@ -20,7 +20,7 @@ {% block header_controls %}{% endblock %} -
{{ child.render_form }}
+
{{ child.render_form }}
{% block footer_controls %}{% endblock %} diff --git a/wagtail/wagtailadmin/templates/wagtailadmin/block_forms/stream_member.html b/wagtail/wagtailadmin/templates/wagtailadmin/block_forms/stream_member.html index 9c69f01aee..89b4cfd66d 100644 --- a/wagtail/wagtailadmin/templates/wagtailadmin/block_forms/stream_member.html +++ b/wagtail/wagtailadmin/templates/wagtailadmin/block_forms/stream_member.html @@ -16,6 +16,8 @@ {% endblock %} +{% block sequence_member_inner_classes %}stream-member-inner{% endblock %} + {% block footer_controls %} {% include "wagtailadmin/block_forms/stream_menu.html" with menu_id=prefix|add:"-appendmenu" state="closed" %} {% endblock %}