Allow clear/white highlighter colour when linking to a PDF

Please add white as a PDF highlighter colour when linking to PDFs.

Creating links between rems and PDFs force you to use a coloured highlighter. This can result in many highlighter marks in a document which can distract from the content.

Adding white would make my PDF less distracting.
Currently, the white square in the highlighter menu stands for cancel highlighter. I would love to have the choice to keep the link and hide the highlighter mark.

Proposed change

Another way to say this is that the “yellow” highlight color should be distinct from the “default” highlight color (what these colors actually are can be modified with CSS).

I would also appreciate a seventh highlight color.

For the moment the following CSS allows you to set the green highlighter to white

.pdf-viewer__highlight-container--green .Highlight__part {
	background-color:white;
}

Nice!

Here is another workaround if you still want some indication that there is a highlight here:

1. Make the green highlight invisible when not hovered and shows a little pin in front instead.

.pdf-viewer__highlight-container--green:not(:hover) .Highlight__part  {
  background-color: transparent;
}

.pdf-viewer__highlight-container--green:not(:hover) .Highlight__part:first-child::before {
  content: "\f08d";
  font-family: Icons;
  font-size: 8px;
  position: absolute;
  left: -5px;
  top: -3px;
  color: rgba(0,0,0,0.3);
}

Normal:

image

Hovered (reverts to normal style):

2. Add a very slight underline.

.pdf-viewer__highlight-container--green:not(:hover) .Highlight__part  {
  background-color: transparent;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

1 Like

Love the pin idea Cheers!