From 3c176894bae9de7958605fe432bff770b9232807 Mon Sep 17 00:00:00 2001 From: kimsible Date: Fri, 7 Aug 2020 19:00:51 +0200 Subject: Add markown compatible help icon in comment textarea --- .../comment/video-comment-add.component.scss | 40 +++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss') diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss index d8f851baf..814417f04 100644 --- a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss +++ b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss @@ -19,11 +19,49 @@ form { .form-group { flex-grow: 1; margin: 0; + position: relative; + + $peertube-textarea-height: 60px; + $markdown-icon-height: 18px; + $markdown-icon-width: 30px; + + .markdown-guide { + position: absolute; + top: 5px; + left: 4px; + + @media screen and (max-width: 600px) { + left: 0; + } + + ::ng-deep .help-tooltip-button { + my-global-icon { + height: $markdown-icon-height; + width: $markdown-icon-width; + + svg { + opacity: 0.5; + } + } + + &:focus, &:active, &:hover { + my-global-icon svg { + opacity: 1; + } + } + } + } textarea { - @include peertube-textarea(100%, 60px); + @include peertube-textarea(100%, $peertube-textarea-height); @include button-focus(pvar(--mainColorLightest)); + text-indent: $markdown-icon-width; + + @media screen and (max-width: 600px) { + text-indent: $markdown-icon-width + 5px; + } + &:focus::placeholder { opacity: 0; } -- cgit v1.2.3