]> source.dussan.org Git - gitea.git/commitdiff
Add some padding to the shadowed comment box (#9612)
authorzeripath <art27@cantab.net>
Sun, 5 Jan 2020 19:25:27 +0000 (19:25 +0000)
committerGitHub <noreply@github.com>
Sun, 5 Jan 2020 19:25:27 +0000 (19:25 +0000)
* Add some padding to the shadowed comment box
* prevent the padding affecting the other comments

templates/repo/issue/view_content/comments.tmpl
web_src/less/_repository.less

index 9a9bb6b8d4b86be7dad5fad33e13cbe58546773a..658494ac30ccba4e30e2bc2c4a6d4e69ae222990 100644 (file)
                                                                                                <img src="{{.Poster.RelAvatarLink}}">
                                                                                        </a>
                                                                                        <div class="content">
-                                                                                               <a class="author" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
-                                                                                               <div class="metadata">
-                                                                                                       <span class="date">{{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdSubStr | Safe}}</span>
-                                                                                               </div>
-                                                                                               <div class="text">
-                                                                                                       <div class="render-content markdown has-emoji">
-                                                                                                       {{if .RenderedContent}}
-                                                                                                               {{.RenderedContent|Str2html}}
-                                                                                                       {{else}}
-                                                                                                               <span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
-                                                                                                       {{end}}
+                                                                                               <div class="code-comment-content">
+                                                                                                       <a class="author" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
+                                                                                                       <div class="metadata">
+                                                                                                               <span class="date">{{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdSubStr | Safe}}</span>
+                                                                                                       </div>
+                                                                                                       <div class="text">
+                                                                                                               <div class="render-content markdown has-emoji">
+                                                                                                               {{if .RenderedContent}}
+                                                                                                                       {{.RenderedContent|Str2html}}
+                                                                                                               {{else}}
+                                                                                                                       <span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
+                                                                                                               {{end}}
+                                                                                                               </div>
+                                                                                                               <div class="raw-content hide">{{.Content}}</div>
                                                                                                        </div>
-                                                                                                       <div class="raw-content hide">{{.Content}}</div>
                                                                                                </div>
                                                                                        </div>
                                                                                </div>
index 6530bcf8e5da8f926103f6305b7285608c4de2a5..cd35b88f3ba3974f007dc89deadba7cc3c7366f9 100644 (file)
                     box-shadow: 0 0 10px #8c8c8c;
                 }
 
+                &:target > .content > .code-comment-content {
+                    padding: 4px;
+                }
+
+                &:target > .content > .code-comment-content > .text {
+                    margin-bottom: 0;
+                }
+
                 .ui.form {
                     .field:first-child {
                         clear: none;