From: Chocobozzz Date: Wed, 18 Apr 2018 13:00:42 +0000 (+0200) Subject: Better responsive design on many comment children X-Git-Tag: v1.0.0-beta.4~50 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c9ffd53217e69395c303ba36532a6eef39645e4e;p=oweals%2Fpeertube.git Better responsive design on many comment children --- 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 3b0b7eafd..3a3f32b83 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 @@ -14,6 +14,8 @@ .comment { flex-grow: 1; + // Fix word-wrap with flex + min-width: 1px; .highlighted-comment { display: inline-block; @@ -44,8 +46,8 @@ } .comment-html { - word-wrap: initial; word-break: normal; + word-wrap: break-word; text-align: justify; /deep/ a { @@ -76,3 +78,26 @@ } } } + +// Decrease the space of child comments on small screens +@media screen and (max-width: 1600px) { + .children { + margin-left: -20px; + } +} + +@media screen and (max-width: 1200px) { + .children { + margin-left: -30px; + } +} + +@media screen and (max-width: 600px) { + .children { + margin-left: -40px; + } + + .root-comment { + img { margin-right: 10px; } + } +} \ No newline at end of file diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.scss b/client/src/app/videos/+video-watch/comment/video-comments.component.scss index 7aadc2866..0b8aa1854 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.scss +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.scss @@ -19,8 +19,8 @@ font-size: 13px; } -.comment-html { - word-wrap: normal; - word-break: normal; - text-align: justify; -} +@media screen and (max-width: 600px) { + .view-replies { + margin-left: 46px; + } +} \ No newline at end of file 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 8bc9f8d9a..fe3cc4ded 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss @@ -215,7 +215,8 @@ font-size: 15px; .video-info-description-html { - word-wrap: break-word; + word-break: normal; + word-wrap: normal; text-align: justify; }