Closed Bug 1571386 Opened 5 years ago Closed 3 years ago

macOS: Styling dropdown selection breaks macOS System UI and shows ugly button design

Categories

(Core :: Layout: Form Controls, defect, P3)

Desktop
macOS
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox88 --- fixed

People

(Reporter: post, Unassigned)

References

Details

(Whiteboard: [mac:nonnativetheme])

Attachments

(5 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Here is a bug report that bugs for a really long time. By default Firefox uses the macOS System UI to show dropdown selections. However applying any CSS styling to a border property breaks the select button e.g. border-width: 1px, border-style: solid, border-color: #cad6de;

Steps to reproduce
jeffersonscher created an excellent page for further testing:
https://www.jeffersonscher.com/res/select-button.html
https://www.jeffersonscher.com/res/select.html

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>select styling affects button</title>
<style>
body {
font-size: 1.5em;
padding-left: 2em;
}
</style>
</head>
<body>
<div>
<p>Styling combobox borders breaks the OS-specific styling of the button:</p>
<p><select name="test1" style="">
<option value="">no border properties set (default)</option>
<option value="">hello</option>
</select> <select name="test5" style="border: 1px solid #cad6de;">
<option value="">border: 1px solid #cad6de;</option>
<option value="">hello</option>
</select></p>
<p><select name="test2" style="border-width: 1px;">
<option value="">border-width: 1px;</option>
<option value="">hello</option>
</select> <select name="test3" style="border-style: solid;">
<option value="">border-style: solid;</option>
<option value="">hello</option>
</select> <select name="test4" style="border-color: #cad6de;">
<option value="">border-color: #cad6de;</option>
<option value="">hello</option>
</select></p>
</div>
</body>
</html>

Actual results:

Firefox for Mac adds an ugly "down" triangle symbol and grey border to the selection button style. It feels like 1999! This is not related to a single page design. The "ugly button design" is visible on all major sites like zdnet.com, soundcloud.com, Matomo Analytics...

Take a look at my screenshot.

Expected results:

It should match the default macOS System UI. Show "up down" triangles without grey border.

See Also: → 1249602

Wow, I missed that bug report. However it's been 4 years and there's still no fix for that.

Attached image Screenshot.png

@howdytom:
Try adding the following to userContent.css.


@charset "utf-8";

/* Make <select>s Mac like */
select {
width: inherit !important;
border: inherit !important;
border-width: inherit !important;
border-style: inherit !important;
border-radius: inherit !important;
background: inherit !important;
background-color: inherit !important;
border-color: inherit !important;
color: inherit !important;
text-indent: inherit !important;
}

select:not([size]):not([multiple]),
select[size="0"],
select[size="1"] {
-moz-appearance: menulist !important;
border-color: initial !important;
background: initial !important;
background-color: #fff !important;
color: initial !important;
padding: initial !important;
font: -moz-list !important;
border-width: initial !important;
border-style: initial !important;
text-indent: initial !important;
}

select:not([size]):not([multiple])[disabled],
select[size="0"][disabled],
select[size="1"][disabled] {
color: GrayText !important;
}

@Eiichi: Thanks for sharing this wonderful workaround. Finally select matches the default macOS System UI. Your fix should be committed to the next FF release. I don't understand why this UI Bug has not been fixed for many years.

What can we do?

@howdytom: For your information.
Since Bug 1541233 landed on Firefox Nightly repository, Firefox 69.0 doesn't allow use of userChrome.css or userContent.css files by default.
To use these files for Firefox customization, you will need to manually set as follows:
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);

@Eiichi: Thanks. Users should not hack or customize Firefox to get the proper macOS System UI. It's a UI bug for many years. Personally ugly form button designs are the main reason to switch back to Safari/Chrome. Is there any way to mark this bug with higher priority?

I was able to reproduce this on MacOs 10.13 on all versions

Release 68.0.1
Beta 69.0b11
Nightly 70.0a1

I was able to reproduce this on MacOs 10.13 on all versions

Release 68.0.1
Beta 69.0b11
Nightly 70.0a1

Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Form Controls
Ever confirmed: true
Product: Firefox → Core
Version: 68 Branch → Trunk
OS: Unspecified → macOS
Hardware: Unspecified → Desktop

The priority flag is not set for this bug.
:jfkthame, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jfkthame)
Priority: -- → P3
Flags: needinfo?(jfkthame)

This will get addressed by the landing of bug 1690842, which may occur as early as today. See the attached screenshot for the new look.

Depends on: 1690842
Whiteboard: [mac:nonnativetheme]

Bug 1690842 has indeed landed and this should now be fixed in current nightly.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Attached screenshot is Safari 14.0.3 on Big Sur 11.2.1 and is different from https://bugzilla.mozilla.org/attachment.cgi?id=9204562.

Why this bug marked as fixed?

Sorry my mistake.

We are not trying to match Safari's appearance, nor the native appearance of select dropdown buttons. We fixed the "ugly 'down' triangle symbol and grey border" by switching to a new, Firefox-specific theme that looks more modern.

Thanks. Why does Firefox not use the native macOS and Windows System OS UI? Why does Mozilla use its own ugly UI design? How decides on such an important point that Firefox-specific theme is more modern?

I have noticed this approach on so many parts of Mozilla product. And it always feels and looks wrong. Frankly this is not I was I hoping for.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

You can follow the history and conversations around non-native theming in bug 1535761 and all the dependent bugs. The short summary is that there are features such as Win32k lockdown and Fission that required us to draw these controls ourselves, rather than deferring to the OS. And similar to Chrome, Edge and other browsers, the decision was made to develop our own designs for these form controls, which will be consistent across platforms.

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: