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

Fix input search placeholder style #287

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,14 @@ li.folder > ul > li.file {
.sidebar .search input[type="search"],
.sidebar .search input[type="search"]:focus {
background-color: #2d1763;
background-image: url("data:image/svg+xml,%3Csvg height='20px' width='20px' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.5)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' preserveAspectRatio='xMidYMid meet' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10.5' cy='10.5' r='7.5' vector-effect='non-scaling-stroke'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='15.8' y2='15.8' vector-effect='non-scaling-stroke'%3E%3C/line%3E%3C/svg%3E");
Copy link
Member

@raxhvl raxhvl Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. Could you describe what issue are you fixing?

Are you trying to override the SVG from plugin-search?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for reviewing,

Thanks for your contribution. Could you describe what issue are you fixing?

I was trying to fix the placeholder and icon within the search input, because it is blurred, not contrast with the background (hard to see).

Are you trying to override the SVG from plugin-search?

ohh, is that cause by the plugin? I don't know about that

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to rahul's question. The current search bar looks good to me, not sure what the issue. Can you please send a screenshot and describe it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-06-10 at 8 45 21 in the morning

I think it is caused by the theme. it will show like above if in light theme

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-06-10 at 8 52 25 in the morning

the code block is also having contrast issue with the background when in light theme

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, this is how ti renders for me:
image

Can you report what browser/OS are you using? Are you sure it's not caused by extension or some settings?
Across all my browsers and devices, both search bar placeholder and block of code are readable. But I agree it should be more explicit in css to avoid breaking in some browsers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it's working fine in dark theme. I use Brave browser on MacOS computer

outline: none;
box-shadow: none;
}
.sidebar .search input[type="search"]::placeholder {
color: white;
opacity: 0.5;
}
.sidebar-nav a:hover {
text-decoration: none;
}
Expand Down
Loading