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 CSS for select with other field sizes #1119

Merged
merged 6 commits into from
May 3, 2020

Conversation

sebsoftware
Copy link
Contributor

The select was rendered distorted in Safari, Chrome, Firefox on macos after the fixing #1090. The no longer set -webkit-appearance to menubutton-list is no longer overriding the line-height. This was set wrongly for field sizes other than md. Also long text was overlayed by arrow images.

Fixes #1097

- Added a note about this repository
The select was rendered distorted in Safari, Chrome, Firefox on macos after the fixing TheCoder4eu#1090. The no longer set -webkit-appearance to menubutton-list is no longer overriding the line-height. This was set wrongly for field sizes other than md. Also long text was overlayed by arrow images.

Fixes TheCoder4eu#1097
@geopossachs geopossachs self-requested a review January 18, 2020 13:09
@stephanrauh
Copy link
Collaborator

It seems updating to Bootstrap 3.4.1 fixes the problem. Can you please verify if it works on the source I've just pushed to GitHub?

@mtvweb
Copy link

mtvweb commented Apr 29, 2020

Still there. Just downloaded bootsfaces-1.5.0-20200429.204938-1.jar and modified selectOneMenu.xhtml from BootfacesWeb.xml second b:selectOneMenu to

<b:selectOneMenu value="#{selectOneMenuBean.type}" colMd="2" required="true" label="Select your car's type:" labelColMd="2" styleClass="car-class" field-size="sm">
chrome
firefox
safari

@stephanrauh
Copy link
Collaborator

@geopossachs That's precisely what I did. Which browser are you using? Does the error occur without your IE bugfix #1090, too?

This is what it looks like on my Mac:

Brave (based on Chromium):
image

Safari (looks a bit odd on the right-hand side, but doesn't shift the text southward):
image

Firefox:
image

@mtvweb
Copy link

mtvweb commented Apr 30, 2020

MacOS 10.14.6
Safari Version 13.1 (14609.1.20.111.8)
Chrome Version 81.0.4044.129 (Offizieller Build) (64-Bit)
Firefox 74.0 (64Bit)

@stephanrauh
Copy link
Collaborator

@mtvweb Oops, sorry for confusing you with Georg. Luckily, you've received my answer nonetheless.

I'm confused. We're running almost the same configuration. I'm running a slightly newer OS, but that shouldn't make much of a difference. Probably the bug is on my side, but I can't spot it. Just to be sure: open your developer tools and disable the cache in the network tab (if you haven't done so already).

You can also try the staging area of BootsFaces. It runs the latest changed I've committed. On my machine, it looks like this:

image

@mtvweb
Copy link

mtvweb commented Apr 30, 2020

It seems to be that you have modified the b:selectOneMenu with select2 for testing. I've used the second one without select2.

@stephanrauh
Copy link
Collaborator

That sounds like one of the thing I'm always doing. But in this case, I don't think so. Mind you, after deliberately switching the second select box to "select2" it looks like so:

image

The most prominent difference being the arrow on the right-hand side of the select box.

Confused greetings :)
Stephan

@geopossachs geopossachs linked an issue May 2, 2020 that may be closed by this pull request
@@ -454,6 +454,15 @@ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.
appearance: none;
}

select.input-sm {
line-height: 20px;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is better then line-height: 30px; of core.css 👍

select.form-control {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20fill%3D%22%23555555%22%20%0A%09%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%22-261%20145.2%2024%2024%22%20style%3D%22enable-background%3Anew%20-261%20145.2%2024%2024%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpath%20d%3D%22M-245.3%2C156.1l-3.6-6.5l-3.7%2C6.5%20M-252.7%2C159l3.7%2C6.5l3.6-6.5%22%2F%3E%0A%3C%2Fsvg%3E");
padding-right: 25px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍


select.input-lg {
line-height: 26px;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is better then the line-height: 46px; of core.css 👍

@geopossachs geopossachs merged commit f0b8e4d into TheCoder4eu:master May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

selectOneMenu visual problem since 1.4.2 b:selectOneMenu: wrong styling in Firefox
4 participants