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

Make search box adapt to placeholder length #2137

Open
d5UtQvp8QQU9 opened this issue Nov 26, 2024 · 0 comments
Open

Make search box adapt to placeholder length #2137

d5UtQvp8QQU9 opened this issue Nov 26, 2024 · 0 comments
Labels
enhancement New feature or request needs-triage

Comments

@d5UtQvp8QQU9
Copy link

In some languages the search box is too small for the placeholder text so the placeholder text is cut off.

This can be fixed by using

.input {
  field-sizing: content;
}

in CSS (see https://stackoverflow.com/a/78456466).

To do this in your Docsy-project, add a file ./assets/scss/_styles_project.scss if it doesn't exist and add the text

@use 'search';

.td-search {
  &__input {
    field-sizing: content;
  }
}

If the file already exists in your project I assume you know how to extend the file without breaking existing extensions.

@d5UtQvp8QQU9 d5UtQvp8QQU9 added enhancement New feature or request needs-triage labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant