philc / philc/vimium

Custom Linkhint text color only changes after 2nd (re)load of websites

Open
#3,817 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
27k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Description:

Using the inbuilt dark mode of Vivaldi, I set up the link hint text color to magenta in CSS. When visiting a new website and pressing "f" the linkhint text is white (with yellow background, as in default setup) instead of magenta. After refreshing the website it works and linkhint text is as custom set magenta. Background color anyway always stays yellow although set to black.

Steps to reproduce the behavior:

  1. Set "Force Dark Mode for Web Contents" to enabled in vivaldi://flags
  2. Modify CSS for Vimuium in Vimium-Settings
  3. Open any url
  4. Press "f" -> linkhints show up with white text and yellow bg
  5. Press "F5" to reload website
  6. Press "f" again and linkhints show up with setup color (in my case, magenta) text and yellow bg although set to black
  7. go to any other url repeat steps 1 to 7

Browser and Vimium version

Vivaldi 3.8.2259.40 (Stable channel) (64-Bit)
OS Linux
JavaScript V8 9.0.257.23
User-Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.95 Safari/537.36
command /usr/bin/vivaldi-stable --enable-features=OverlayScrollbar --flag-switches-begin --enable-features=OverlayScrollbar,CSSColorSchemeUARendering,WebContentsForceDark --flag-switches-end --origin-trial-disabled-features=SecurePaymentConfirmation --save-page-as-mhtml

Vimium Version: 1.66

Custom CSS

`div > .vimiumHintMarker {
/* linkhint boxes */
background: black;
border: 1px solid #E3BE23;
}

div > .vimiumHintMarker span {
/* linkhint text */
color: magenta;
font-weight: bold;
font-size: 14px;
}

div > .vimiumHintMarker > .matchingCharacter {
}

/* Vomnibar Dark CSS */

#vomnibar {
display: block;
position: fixed;
width: calc(100% - 20px); /* adjusted to keep border radius and box-shadow visible*/
/min-width: 400px;
top: 70px;
left: 50%;
/
top: 8px;
left: 8px;
/margin: 0 0 0 -40%;/
font-family: sans-serif;

background: rgb(88, 88, 88);
text-align: center;
border-radius: 4px;
box-shadow: 0px 2px 8px rgba(255, 255, 255, 0.4);
border: 1px solid #4c4c4c;
z-index: 2139999999; /* One less than hint markers and the help dialog (see ../content_scripts/vimium.css). */

}

#vomnibar input {
color: rgb(230, 230, 230);
font-family: 'Open Sans', Helvetica Neue, Arial, sans-serif;
font-size: 28px;
height: 44px;
margin-bottom: 0;
padding: 4px;
background-color: rgb(34, 44, 53);
border-radius: 3px;
border: 1px solid #8e8e8e;
box-shadow: #444 0px 0px 1px;
width: 100%;
outline: none;
box-sizing: border-box;
}

#vomnibar .vomnibarSearchArea {
display: block;
padding: 10px;
background-color: rgb(90, 90, 90);
border-radius: 4px 4px 0 0;
border-bottom: 1px solid rgb(101, 104, 109);
}

#vomnibar ul {
background-color: rgb(88, 91, 94);
border-radius: 0 0 4px 4px;
list-style: none;
padding: 10px 0;
padding-top: 0;
}

#vomnibar li {
border-bottom: 1px solid #ddd;
line-height: 1.1em;
padding: 7px 10px;
font-size: 16px;
color: black;
position: relative;
display: list-item;
margin: auto;
}

#vomnibar li:last-of-type {
border-bottom: none;
}

#vomnibar li .vomnibarTopHalf, #vomnibar li .vomnibarBottomHalf {
display: block;
overflow: hidden;
}

#vomnibar li .vomnibarBottomHalf {
font-size: 15px;
margin-top: 3px;
padding: 2px 0;
}

#vomnibar li .vomnibarIcon {
background-position-y: center;
background-size: 16px;
background-repeat: no-repeat;
padding-left: 20px;
}

#vomnibar li .vomnibarSource {
color: rgb(167, 167, 167);
margin-right: 4px;
}
#vomnibar li .vomnibarRelevancy {
position: absolute;
right: 0;
top: 0;
padding: 5px;
background-color: rgb(88, 91, 94);
color: black;
font-family: monospace;
width: 100px;
overflow: hidden;
}

#vomnibar li .vomnibarUrl {
white-space: nowrap;
color: #b6d1ff;
}

#vomnibar li .vomnibarMatch {
font-weight: bold;
color: rgb(255, 255, 255);
}

#vomnibar li em, #vomnibar li .vomnibarTitle {
color: rgb(255, 255, 255);
margin-left: 4px;
font-weight: normal;
}
#vomnibar li em { font-style: italic; }
#vomnibar li em .vomnibarMatch, #vomnibar li .vomnibarTitle .vomnibarMatch {
color: rgb(216, 216, 216);
}

#vomnibar li.vomnibarSelected {
background-color: #5e6773;
font-weight: normal;
}

#vomnibarInput::selection {
/* This is the light grey color of the vomnibar border. /
/
background-color: #F1F1F1; */

/* This is the light blue color of the vomnibar selected item. */
/* background-color: #BBCEE9; */

/* This is a considerably lighter blue than Vimium blue, which seems softer
 * on the eye for this purpose. */
/* background-color: #E6EEFB; */
background-color: #6a839c;

}

.vomnibarInsertText {
}

.vomnibarNoInsertText {
visibility: hidden;
}`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with Vivaldi's Force Dark Mode enabled and the custom CSS from the report, then inspect the link hint rendering and custom CSS injection path. Verify the fix by opening a new URL and confirming that the configured text and background colors apply on the first hint display, without requiring a reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.