From 90dca08f380cf7d08c07beb3903d0170a6b2411c Mon Sep 17 00:00:00 2001 From: r888888888 Date: Mon, 2 Feb 2015 17:50:38 -0800 Subject: [PATCH] prevent note inner border from desyncing with outer border --- app/assets/javascripts/notes.js | 8 ++++++++ app/assets/stylesheets/specific/notes.css.scss | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 56acdc93e..dff1ca112 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -130,6 +130,14 @@ Danbooru.Note = { height: $note_box.height() - 2, width: $note_box.width() - 2 }); + + if ($inner_border.width() >= $note_box.width() - 2) { + $note_box.width($inner_border.width() + 2); + } + + if ($inner_border.height() >= $note_box.height() - 2) { + $note_box.height($inner_border.height() + 2); + } }, scale: function($note_box) { diff --git a/app/assets/stylesheets/specific/notes.css.scss b/app/assets/stylesheets/specific/notes.css.scss index dd1deb55d..8ed5d236b 100644 --- a/app/assets/stylesheets/specific/notes.css.scss +++ b/app/assets/stylesheets/specific/notes.css.scss @@ -74,7 +74,8 @@ div#note-container { div.note-box.embedded div.note-box-inner-border { text-align: center; - word-wrap: break-word; + display: table-cell; + vertical-align: middle; } }