diff --git a/wagtail/wagtailadmin/static_src/wagtailadmin/js/page-editor.js b/wagtail/wagtailadmin/static_src/wagtailadmin/js/page-editor.js index 552260b0bf..a001f88c8d 100644 --- a/wagtail/wagtailadmin/static_src/wagtailadmin/js/page-editor.js +++ b/wagtail/wagtailadmin/static_src/wagtailadmin/js/page-editor.js @@ -335,7 +335,7 @@ function initCollapsibleBlocks() { $fieldset.hide(); } - $li.find('h2').click(function() { + $li.find('> h2').click(function() { if (!$li.hasClass('collapsed')) { $li.addClass('collapsed'); $fieldset.hide('slow'); 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 d5c508ebaf..4e602c0b0e 100644 --- a/wagtail/wagtailadmin/static_src/wagtailadmin/scss/layouts/page-editor.scss +++ b/wagtail/wagtailadmin/static_src/wagtailadmin/scss/layouts/page-editor.scss @@ -293,33 +293,18 @@ min-height: 41px; h2{ - cursor: pointer; - } - h2:before{ - content: '6'; - text-shadow:none; - line-height: 40px; - padding-right: 1px; - opacity: 1; - color: #666; - background-color: transparent; - @include transition(background-color 0.2s ease, color 0.2s ease); - } - h2:hover:before{ + &:before, label:before{ + content: '6'; + cursor: pointer; + } } + &.collapsed{ - background: #fff; h2{ - @include box-shadow(none); - } - h2:before{ - content: '5'; - color: #fff; - background-color:$color-teal; - } - h2:hover:before{ - background-color:$color-teal-darker; + &:before, label:before{ + content: '5'; + } } } }