From 1e3f5d48d5a1316b9652058d0f8417c4726e634a Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 24 Mar 2015 14:15:38 +1030 Subject: [PATCH] Add animation when showing deleted post content --- ember/app/styles/flarum/discussion.less | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ember/app/styles/flarum/discussion.less b/ember/app/styles/flarum/discussion.less index 789790406..a77c84206 100644 --- a/ember/app/styles/flarum/discussion.less +++ b/ember/app/styles/flarum/discussion.less @@ -134,6 +134,7 @@ .post { padding-bottom: 1px; transition: 0.2s box-shadow; + position: relative; & .contextual-controls { float: right; @@ -205,20 +206,26 @@ line-height: 1.6em; } .post.is-hidden { - & .post-user, & .post-header > ul, & .post-header > ul a:not(.btn) { + & .post-user h3, & .post-user h3 a, & .post-header, & .post-header > ul > li > a { color: @fl-body-muted-more-color; } - &:not(.reveal-content) { - & .post-body, & .post-footer, & .avatar { - display: none; - } + & .post-body, & .post-footer, & h3 .avatar { + position: absolute; + overflow: hidden; + height: 0; + opacity: 0; + margin-top: -5px; + .transition(~"margin-top 0.2s, opacity 0.2s"); } &.reveal-content { - & .post-body, & .post-footer, & .avatar { + & .post-body, & .post-footer, & h3 .avatar { + position: static; + height: auto; opacity: 0.5; + margin-top: 0; } } - & .btn-more { + & .post-header .btn-more { background: #eee; color: @fl-body-muted-more-color; }