Skip to content

Commit

Permalink
Fixed style for back-to-top button when olrk-chat is active
Browse files Browse the repository at this point in the history
  • Loading branch information
cheh committed Mar 11, 2015
1 parent 45c9304 commit 149e2ef
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2107,6 +2107,7 @@ figure.frame {
overflow:hidden;
z-index:99;
}
.olrk-live-chat #back-top-wrapper { bottom:40px; }
#back-top a {
display:block;
width:50px;
Expand Down
12 changes: 12 additions & 0 deletions includes/live-chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,16 @@ function tm_live_chat_code() {
<?php
}

}

add_filter( 'body_class', 'tm_live_chat_body_class', 99 );
function tm_live_chat_body_class( $classes ) {
$chat_id = of_get_option( 'live_chat_id' );
if ( !$chat_id ) {
return $classes;
}

$classes[] = 'olrk-live-chat';

return $classes;
}
3 changes: 3 additions & 0 deletions less/misc.less
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ figure.frame {
bottom: 10px;
overflow: hidden;
z-index: 99;
.olrk-live-chat & {
bottom: 40px;
}
}
a {
display: block;
Expand Down

0 comments on commit 149e2ef

Please sign in to comment.