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

css of autocompletes is faulty #330

Closed
sennierer opened this issue Oct 10, 2023 · 6 comments · Fixed by #758 or #756
Closed

css of autocompletes is faulty #330

sennierer opened this issue Oct 10, 2023 · 6 comments · Fixed by #758 or #756
Assignees
Labels
bug Something isn't working (properly, as expected, at all) UI-UX Appearance, coherence, usability of user-facing parts (frontend, user interface)

Comments

@sennierer
Copy link
Collaborator

in autocompletes the selection and the default text are not in the middle of the line
screenshot-127 0 0 1_8001-2023 10 10-11_40_25
setting line-height: initial for the span that holds the autocomplete fixes that
screenshot-127 0 0 1_8001-2023 10 10-11_42_15
-> there might be a better fix though

@koeaw
Copy link
Contributor

koeaw commented Dec 4, 2023

Possibly the same problem I'm seeing with the import from/create from GND dropdown (leaving aside the fact I'm not sure if we didn't discuss removing or reworking this anyway):

Screenshot 2023-12-04 at 17-04-11 Browse Werk

@koeaw koeaw added bug Something isn't working (properly, as expected, at all) UI-UX Appearance, coherence, usability of user-facing parts (frontend, user interface) labels Dec 4, 2023
@koeaw
Copy link
Contributor

koeaw commented Dec 11, 2023

setting line-height: initial for the span that holds the autocomplete fixes that

To add to my comment from last week (above): when I looked at the CSS of this same-ish problem I came across, I noticed that yeah, there's a mismatch between font size and line height (and height).

The computed default line-height would/should be 24px for the computed font-size of 16px (1rem) of the last 3 spans which contain one another, but it's set to 28px. The next <span> wrapping those 3 additionally has its computed height set to 28px when it should be 38px by default.

@koeaw
Copy link
Contributor

koeaw commented Dec 11, 2023

It's these four (copy/paste from my browser, minus the span with the dropdown arrow):

<span class="select2-selection select2-selection--single listselect2 form-control" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-labelledby="select2-id_entity-container">
  <span class="select2-selection__rendered" id="select2-id_entity-container">
    <span class="select2-selection__placeholder">
      <span>Type to get suggestions</span>
    </span>
  </span>
</span>

@b1rger
Copy link
Contributor

b1rger commented Mar 1, 2024

I think this might be this issue - so maybe moving to bootstrap 4 might solve the issue for us

@koeaw
Copy link
Contributor

koeaw commented Mar 12, 2024

Later comments in a newer issue seem to indicate this is indeed a Bootstrap problem – with select2 – and that it persists in Bootstrap 4.

Suggested fix is: https://github.com/apalfrey/select2-bootstrap-5-theme

@koeaw
Copy link
Contributor

koeaw commented Mar 12, 2024

Ah, I guess you meant to say Bootstrap 5 anyway!

@sennierer sennierer self-assigned this Mar 28, 2024
sennierer added a commit that referenced this issue Mar 28, 2024
please note: this is a preliminary fix and should be removed when
moving to boostrap5, see the comments in the corresponding issue

resolves #330
b1rger pushed a commit that referenced this issue Apr 2, 2024
please note: this is a preliminary fix and should be removed when
moving to boostrap5, see the comments in the corresponding issue

resolves #330
b1rger pushed a commit that referenced this issue Apr 2, 2024
please note: this is a preliminary fix and should be removed when
moving to boostrap5, see the comments in the corresponding issue

resolves #330
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (properly, as expected, at all) UI-UX Appearance, coherence, usability of user-facing parts (frontend, user interface)
Projects
None yet
3 participants