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 Firefox: color for select options #946

Merged
merged 3 commits into from
Nov 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ way to update this template, but currently, we follow a pattern:

---

## Upcoming version 2018-11-XX

* [fix] Firefox showed select options with the same color as select itself. Now options have their
own color set and *placeholder option needs to be disabled*.
[#946](https://github.com/sharetribe/flex-template-web/pull/946)

## v2.2.0 2018-10-31

* [add] SearchPage: adds PriceFilter (and RangeSlider, FieldRangeSlider, PriceFilterForm).
Expand Down
3 changes: 2 additions & 1 deletion docs/customization-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,5 @@ See more in the [testing documentation](testing.md).
## Customization

There are many things that you should change in the default template, and many more that you can
change. Read [more about FTW](README.md) and check the [Customization checklist](customization-checklist.md) documentation too before publishing your site.
change. Read [more about FTW](README.md) and check the
[Customization checklist](customization-checklist.md) documentation too before publishing your site.
4 changes: 2 additions & 2 deletions ext/default-mail-templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ A template consists of two files:
* `TEMPLATE_NAME-subject.txt` - holds the mail Subject line template
* `TEMPLATE_NAME-html.html` - contains the template for the HTML version of the mail

Both parts are mandatory. All emails that are sent from the marketplace contain both the HTML and plain
text variants and the recipient's mail client is free to choose which one to visualize and
Both parts are mandatory. All emails that are sent from the marketplace contain both the HTML and
plain text variants and the recipient's mail client is free to choose which one to visualize and
how. The text version is automatically generated from the HTML template.

## Template syntax
Expand Down
6 changes: 3 additions & 3 deletions src/components/FieldBirthdayInput/FieldBirthdayInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class BirthdayInputComponent extends Component {
onBlur={() => this.handleSelectBlur()}
onChange={e => this.handleSelectChange('day', e.target.value)}
>
<option>{datePlaceholder}</option>
<option disabled>{datePlaceholder}</option>
{days.map(d => (
<option key={d} value={d}>
{pad(d)}
Expand All @@ -176,7 +176,7 @@ class BirthdayInputComponent extends Component {
onBlur={() => this.handleSelectBlur()}
onChange={e => this.handleSelectChange('month', e.target.value)}
>
<option>{monthPlaceholder}</option>
<option disabled>{monthPlaceholder}</option>
{months.map(m => (
<option key={m} value={m}>
{pad(m)}
Expand All @@ -197,7 +197,7 @@ class BirthdayInputComponent extends Component {
onBlur={() => this.handleSelectBlur()}
onChange={e => this.handleSelectChange('year', e.target.value)}
>
<option>{yearPlaceholder}</option>
<option disabled>{yearPlaceholder}</option>
{years.map(y => (
<option key={y} value={y}>
{y}
Expand Down
7 changes: 7 additions & 0 deletions src/components/FieldSelect/FieldSelect.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
.select {
color: var(--matterColorAnti);
border-bottom-color: var(--attentionColor);

& > option {
color: var(--matterColor);
}
& > option:disabled {
color: var(--matterColorAnti);
}
}

.selectSuccess {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const CustomCategorySelectFieldMaybe = props => {
label={categoryLabel}
validate={categoryRequired}
>
<option value="">{categoryPlaceholder}</option>
<option disabled value="">
{categoryPlaceholder}
</option>
{categories.map(c => (
<option key={c.key} value={c.key}>
{c.label}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ exports[`EditListingDescriptionForm matches snapshot 1`] = `
value=""
>
<option
disabled={true}
value=""
>
EditListingDescriptionForm.categoryPlaceholder
Expand Down
4 changes: 3 additions & 1 deletion src/forms/PayoutDetailsForm/PayoutDetailsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ const PayoutDetailsFormComponent = props => (
label={countryLabel}
validate={countryRequired}
>
<option value="">{countryPlaceholder}</option>
<option disabled value="">
{countryPlaceholder}
</option>
{supportedCountries.map(c => (
<option key={c} value={c}>
{intl.formatMessage({ id: `PayoutDetailsForm.countryNames.${c}` })}
Expand Down