From 3d6904cd5f04dcbc68cecc1cffdc21ff05fa8c9b Mon Sep 17 00:00:00 2001 From: Luke Barratt Date: Fri, 6 Jun 2014 21:10:37 +0100 Subject: [PATCH] Fixes word wrapping issues --- .../stylesheets/themes/default/components/_comments.scss | 5 +++++ .../stylesheets/themes/default/components/_shoutbox.scss | 2 +- app/assets/stylesheets/themes/flat/components/_comments.scss | 5 +++++ app/assets/stylesheets/themes/flat/components/_shoutbox.scss | 2 +- app/views/comments/_comment.html.erb | 4 +++- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/themes/default/components/_comments.scss b/app/assets/stylesheets/themes/default/components/_comments.scss index 402c3e3..5100e38 100644 --- a/app/assets/stylesheets/themes/default/components/_comments.scss +++ b/app/assets/stylesheets/themes/default/components/_comments.scss @@ -58,6 +58,11 @@ width: 100%; position: relative; + .comment-body { + word-break: break-word; + word-wrap: break-word; + } + h1 { font-size: 1em; margin-bottom: .5em; diff --git a/app/assets/stylesheets/themes/default/components/_shoutbox.scss b/app/assets/stylesheets/themes/default/components/_shoutbox.scss index b749092..7e56fb2 100644 --- a/app/assets/stylesheets/themes/default/components/_shoutbox.scss +++ b/app/assets/stylesheets/themes/default/components/_shoutbox.scss @@ -39,8 +39,8 @@ display: table-cell; .contents { + word-break: break-word; word-wrap: break-word; - word-break: break-all; position: relative; display: block; padding: 0 10px; diff --git a/app/assets/stylesheets/themes/flat/components/_comments.scss b/app/assets/stylesheets/themes/flat/components/_comments.scss index 796ab21..c2bd741 100644 --- a/app/assets/stylesheets/themes/flat/components/_comments.scss +++ b/app/assets/stylesheets/themes/flat/components/_comments.scss @@ -58,6 +58,11 @@ width: 100%; position: relative; + .comment-body { + word-break: break-word; + word-wrap: break-word; + } + h1 { font-size: 1em; margin-bottom: .5em; diff --git a/app/assets/stylesheets/themes/flat/components/_shoutbox.scss b/app/assets/stylesheets/themes/flat/components/_shoutbox.scss index b749092..7e56fb2 100644 --- a/app/assets/stylesheets/themes/flat/components/_shoutbox.scss +++ b/app/assets/stylesheets/themes/flat/components/_shoutbox.scss @@ -39,8 +39,8 @@ display: table-cell; .contents { + word-break: break-word; word-wrap: break-word; - word-break: break-all; position: relative; display: block; padding: 0 10px; diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index 83b1850..ca08506 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -19,7 +19,9 @@ <% end %> <% end %> - <%= comment.text_parsed.html_safe %> +
+ <%= comment.text_parsed.html_safe %> +

<%= comment.created_at.strftime("%-d %B %Y, %H:%M") %>