Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change background color of / results #271

Closed
elig0n opened this issue Jan 1, 2021 · 6 comments
Closed

change background color of / results #271

elig0n opened this issue Jan 1, 2021 · 6 comments

Comments

@elig0n
Copy link

elig0n commented Jan 1, 2021

I want to change the background color of the find in page / results (not ctrl+f)
I tried

/* #find */ 
::selection { background: green !important; }

as from https://github.com/gdh1995/vimium-c/blob/master/front/vimium-c.css
but without success
I also tried putting the selector in other sections.

@gdh1995
Copy link
Owner

gdh1995 commented Jan 1, 2021

It's because in vimium-c.css, the meaning /* #find */ is not the same as the one of "Custom CSS for Vimium C UI". The first two lines have special usages.

In this case, you may use /* #find:host */, to style webpage content when FindMode is active.

Well, but I just find it's impossible (up to now) to change the background for ::selection - Vimium C's default rule about it will always override user's rules for background of ::selection (v1.88.0 has fixed it). I'll try to find a way to fix it.

@gdh1995
Copy link
Owner

gdh1995 commented Jan 4, 2021

Hello, v1.88.0 has been released, and /* #find:host */ should work now.

@elig0n
Copy link
Author

elig0n commented Apr 26, 2022

How to change the background of found highlighted text after I press enter ?

@gdh1995
Copy link
Owner

gdh1995 commented Apr 26, 2022

The orange color, which is made by Vimium C, will keep working, until a next selection change.

When you press <enter>, FindMode exits, so in a new selection change the color of selection will have no relation with Vimium C - it will be decided by web pages and your browser. Then Vimium C doesn't provide a way to modify the color.

You may use other extensions to change web page styles to whatever you like (by injecting CSS code).

@elig0n
Copy link
Author

elig0n commented Apr 27, 2022

I am asking how to change the orange color since :host does not change it

@gdh1995
Copy link
Owner

gdh1995 commented Apr 27, 2022

But, after pressing <enter> and FindMode exits, Vimium C won't manage web pages' CSS styles any more.

So what's the real thing you want?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants