Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

[Feature Request] Search windows - width customizable #1518

Closed
grospoulpe opened this issue Mar 11, 2021 · 3 comments
Closed

[Feature Request] Search windows - width customizable #1518

grospoulpe opened this issue Mar 11, 2021 · 3 comments

Comments

@grospoulpe
Copy link

I would be nice to be able to change the width (see below, for an example)
I usually zoom 200% (4k display, 28 inches), but there still enough room on the left/right sides to put some content.
In fact, when using the pop-up window, the width is adapting itself according to the content, but on the search window, the width is fixed, it seems

Thanks in advance! :)

2021-03-11 yomichan width

@grospoulpe grospoulpe changed the title Search windows - width customizable [Feature Request] Search windows - width customizable Mar 11, 2021
@toasted-nutbread
Copy link
Collaborator

Add something like this to the Configure custom CSS… option (enable Advanced):

:root {
    --main-content-size: calc(1200em / var(--font-size-no-units));
}

1200 is the width, in pixels; you can change that to whatever value you like (keep the em suffix attached to the number).

@grospoulpe
Copy link
Author

Thank you very much; works great (I left 1200em, and it's good enough :) )
So, now, with 200% zoom, on a 2560x1440 display, almost all width is used :)

@toasted-nutbread
Copy link
Collaborator

Note that for future simplicity, I have made a change to the CSS variable name which controls width, so you may have to update your CSS in the future. The new code for versions after 21.2.28.2 will be:

:root {
    --content-width-search: 1200;
}

If you want, you can assign both values now and when the update happens in the future, it will be compatible:

:root {
    --main-content-size: calc(1200em / var(--font-size-no-units));
    --content-width-search: 1200;
}

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

No branches or pull requests

2 participants