changeset 5362:24d01c64c5f3

comments: when linking to specific comments, make the browser show a bit of the context of the comment Make the link targets have an invisible pre: that goes 100px above the target.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 05 Aug 2015 12:29:41 +0200
parents 5f0f341c5a44
children 605dbc13eeb7
files kallithea/public/css/style.css
diffstat 1 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/css/style.css	Wed Aug 05 12:29:41 2015 +0200
+++ b/kallithea/public/css/style.css	Wed Aug 05 12:29:41 2015 +0200
@@ -4128,7 +4128,7 @@
     max-width: 978px;
 }
 
-.comments .comment {
+.comments .comment .comment-wrapp {
     border: 1px solid #ddd;
     margin-top: 10px;
     border-radius: 4px;
@@ -4328,20 +4328,19 @@
     margin: 0;
     padding: 0 20px 0px;
 }
-.inline-comments .comment {
+
+.inline-comments .comment .comment-wrapp {
     max-width: 978px;
     border: 1px solid #ddd;
     border-radius: 4px;
     margin: 3px 3px 5px 5px;
     background-color: #FAFAFA;
 }
+
 .inline-comments .add-comment {
     padding: 2px 4px 8px 5px;
 }
 
-.inline-comments .comment-wrapp {
-    padding: 1px;
-}
 .inline-comments .comment .meta {
     background: #f8f8f8;
     padding: 4px;
@@ -4839,6 +4838,15 @@
     transform: scale(1.2, 1.2);
 }
 
+/* show some context of link targets - but only works when the link target
+   can be extended with any visual difference */
+:target:before {
+  display: block;
+  height: 100px;
+  margin: -100px 0 0;
+  content: "";
+}
+
 div.comment:target>.comment-wrapp {
     border: solid 2px #ee0 !important;
 }