MediaWiki:Gadget-GrAnnotations.css: Difference between revisions

No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
  * gr_annotations.css  —  grantha.io inline Notes + Bookmarks + Feedback  (v3)
  * gr_annotations.css  —  grantha.io inline Notes + Bookmarks + Feedback  (v3)
  */
  */
/* ── Icon base ──────────────────────────────────────────────────── */
.gra-icon {
  display: inline-block;
  width:  20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}
/* comment.svg → Feedback (flag/report)  */
.gra-icon-feedback { background-image: url('/images/feedback.svg'); }
/* notes.svg  → Notes                  */
.gra-icon-note    { background-image: url('/images/notes.svg'); }
.gra-icon-bookmark { background-image: url('/images/bookmark.svg'); }
.gra-icon-copy    { background-image: url('/images/copy.svg'); }
.gra-icon-search { background-image: url('/images/search.svg'); }
.gra-icon-dismiss { background-image: url('/images/close.svg'); }


/* ══════════════════════════════════════════════════════════════════
/* ══════════════════════════════════════════════════════════════════
Line 91: Line 72:
   position: fixed;
   position: fixed;
   top: 0;
   top: 0;
   right: -360px;
   right: -400px;
   width: 340px;
   width: 400px;
   height: 100vh;
   height: 100vh;
   background: #fff;
   background: #fff;
Line 385: Line 366:
   border-color: #34a853;
   border-color: #34a853;
   box-shadow: 0 0 0 2px rgba(52,168,83,0.25);
   box-shadow: 0 0 0 2px rgba(52,168,83,0.25);
}
/* NEW: were missing entirely — confirmed the reported "highlight not
  happening" gap was exactly this: bookmark and footnote cards had no
  .gra-card-active rule at all, so clicking their highlight in the
  document correctly scrolled to the card but showed no visual flash.
  Matches each type's own established color (see section 6 below —
  blue for bookmark, yellow/amber for footnote) rather than inventing a
  new, inconsistent color. */
.gra-bookmark-card.gra-card-active {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26,115,232,0.25);
}
.gra-footnote-card.gra-card-active {
  border-color: #fbbc04;
  box-shadow: 0 0 0 2px rgba(251,188,4,0.35);
}
}
.gra-card-header {
.gra-card-header {
Line 505: Line 501:
   gap: 8px;
   gap: 8px;
}
}
.gra-bm-composer-label .gra-icon, .gra-composer-header .gra-icon, .gra-tab .gra-icon, .gra-note-card .gra-icon, .gra-bookmark-card .gra-icon {
.gra-bm-composer-label .gra-icon, .gra-composer-header .gra-icon, .gra-tab .gra-icon, .gra-note-card .gra-icon, .gra-bookmark-card .gra-icon {filter: brightness(0) saturate(100%) invert(7%) sepia(8%) saturate(894%) hue-rotate(357deg) brightness(97%) contrast(92%);
margin-top: -3px;
filter: brightness(0) saturate(100%) invert(7%) sepia(8%) saturate(894%) hue-rotate(357deg) brightness(97%) contrast(92%);
}
}


Line 534: Line 528:
   transition: background 0.15s;
   transition: background 0.15s;
}
}
.gra-bookmark-highlight:hover { background: rgba(26, 115, 232, 0.22); }
/* NEW: was missing entirely — notes and footnotes already had their own
  .gra-hl-active rule, bookmarks had none, confirmed directly. */
.gra-bookmark-highlight:hover,
.gra-bookmark-highlight.gra-hl-active {
  background: rgba(26, 115, 232, 0.28);
  outline: 1.5px solid #1a73e8;
}
 
/* Footnote highlight — yellow tint */
.gra-qe-footnote-highlight {
  background: rgba(251, 188, 4, 0.28);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s;
}
.gra-qe-footnote-highlight:hover,
.gra-qe-footnote-highlight.gra-hl-active {
  background: rgba(251, 188, 4, 0.5);
  outline: 1.5px solid #fbbc04;
}
 
/* REMOVED: .gra-qe-sandarbha-highlight — Sandarbha was fully replaced by
  the real Ullekha citation-index feature (gr-reference class) earlier
  in the project. This class is never applied by any current code, so
  this was dead CSS. */


/* ══════════════════════════════════════════════════════════════════
/* ══════════════════════════════════════════════════════════════════