Änderungen von Dokument Style

Zuletzt geändert von Daniel Herrmann am 2026/02/07 23:23

Von Version Icon 3.1 Icon
bearbeitet von Daniel Herrmann
am 2025/11/08 02:44
Änderungskommentar: Install extension [org.xwiki.platform:xwiki-platform-annotation-ui/17.9.0]
Auf Version Icon 4.1
bearbeitet von Daniel Herrmann
am 2026/02/07 23:23
Änderungskommentar: Install extension [org.xwiki.platform:xwiki-platform-annotation-ui/18.0.1]

Zusammenfassung

Details

Icon XWiki.StyleSheetExtension[0]
Code
... ... @@ -43,24 +43,45 @@
43 43  }
44 44  
45 45  /* Annotations displayed in the text */
46 -.annotation-highlight {
47 - background-color: #FE9;
48 -}
49 -
50 -.annotation-marker {
51 - background: transparent #attImgURL('notesmall') no-repeat left top;
52 - display: inline-block;
53 - height: 10px;
54 - overflow: hidden;
55 - text-indent: -9999px;
56 - width: 10px;
57 - vertical-align: baseline;
58 - margin: -15px -7px 5px -3px;
59 - z-index: 1;
46 +.annotation-highlight, .selection-highlight {
60 60   position: relative;
48 + background-color: var(--mark-bg);
49 + /* Remove the default mark padding added in bootstrap.
50 + The highlights can happen in the middle of words, and it would look odd. */
51 + padding: 0;
61 61   cursor: pointer;
53 + &.hovered,
54 + &.hovered .annotation-highlight, &.hovered .selection-highlight {
55 + /* We want to increase the accent on the element when hovered.
56 + The btn warning background color does that without reducing contrast with the default text color too much.
57 + We use this class set dynamically in JS instead of pseudo classes because we want highlights to span multiple
58 + marks across text blocks. */
59 + /* We repeat the selector because of nested annotation marks. */
60 + background-color: var(--mark-highlighted-bg);
61 + }
62 +
63 + .annotation-toggle {
64 + /* We don't want the annotation toggle to disturb the text layout. */
65 + position: absolute;
66 + margin: 0;
67 + z-index: 1;
68 + /* But we still need to center it relative to its parent. */
69 + top: 50%;
70 + transform: translateY(-50%);
71 + transition: opacity .5s ease;
72 + }
73 +
74 + .annotation-toggle.sr-only {
75 + opacity: 0;
76 + }
62 62  }
63 63  
79 +mark.annotation:not(.annotation-highlight) {
80 + padding: 0;
81 + background-color: unset;
82 + color: unset;
83 +}
84 +
64 64  /* Annotation boxes */
65 65  .annotation-bubble {
66 66   background: $theme.backgroundSecondaryColor;
... ... @@ -67,10 +67,10 @@
67 67   border: 1px dotted $theme.borderColor;
68 68   width: 560px;
69 69   position: absolute;
70 - z-index: 2;
71 71   border-radius: 0 10px 10px 10px;
72 72   box-shadow: 0 2px 4px -1px $theme.linkColor;
73 - margin-left: 20px;
93 + margin: 0 10px;
94 + z-index: 2;
74 74  }
75 75  
76 76  .annotation-bubble:before, .annotation-bubble:after {