From 7a14004b4e16e23076f29d9c5d890f2a5130e171 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 20 Apr 2018 08:19:46 +0200 Subject: [PATCH] Use mixin for word wrap --- .../+video-watch/comment/video-comment.component.scss | 9 +-------- .../videos/+video-watch/video-watch.component.scss | 9 +-------- client/src/sass/include/_mixins.scss | 11 +++++++++++ 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.scss b/client/src/app/videos/+video-watch/comment/video-comment.component.scss index 4c481d486..c90f9849b 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment.component.scss +++ b/client/src/app/videos/+video-watch/comment/video-comment.component.scss @@ -46,14 +46,7 @@ } .comment-html { - word-break: normal; - word-wrap: break-word; - overflow-wrap: break-word; - -webkit-hyphens: auto; - -ms-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; - text-align: justify; + @include peertube-word-wrap; /deep/ a { @include disable-default-a-behaviour; diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index b9596cbee..1b44f0d6a 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss @@ -215,14 +215,7 @@ font-size: 15px; .video-info-description-html { - word-break: normal; - word-wrap: break-word; - overflow-wrap: break-word; - -webkit-hyphens: auto; - -ms-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; - text-align: justify; + @include peertube-word-wrap; } .description-loading { diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss index f905f9ae5..7e7a38bbd 100644 --- a/client/src/sass/include/_mixins.scss +++ b/client/src/sass/include/_mixins.scss @@ -16,6 +16,17 @@ } } +@mixin peertube-word-wrap { + word-break: normal; + word-wrap: break-word; + overflow-wrap: break-word; + -webkit-hyphens: auto; + -ms-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; + text-align: justify; +} + @mixin peertube-input-text($width) { display: inline-block; height: $button-height; -- 2.25.1