Problem/Motivation

Search form block enabled in header region of Bartik Theme does not show the typed text.

The entered search text in the Search form block does not display, seems the font color is set to white due to which the typed text does not appear. This only happens when the Search form block is enabled in header section.

Proposed resolution

# Add correct color, #000000, so that the typed text is visible.

Remaining tasks

User interface changes

Before patch:

After applying patch:

API changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

a_thakur’s picture

Status: Active » Needs work
Mukeysh’s picture

Status: Needs work » Needs review
FileSize
616 bytes

Please find the patch which fixes the issue.

dervishmoose’s picture

+++ b/core/themes/bartik/css/style.css
@@ -420,7 +420,8 @@ h1.site-name {
-.region-header .form-text {
+.region-header .form-text,
+.region-header .form-search {
   background: #fefefe;

Adding form text and form search to this class produces a more useable search box, but causes issues. Suggest a simple .region-header .form-search {
color: #000000;
}

dervishmoose’s picture

Added
.region-header .form-search {
color: #000000;
}

dervishmoose’s picture

Fixed patch

Mukeysh’s picture

The color should be #3b3b3b as in the other forms. Please find the patch which fixes this issue.

Rick Hood’s picture

Confirming I get #3b3b3b; for text in search.

Rick Hood’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Needs work

This also occurs if you put the search block in the footer region. And this would also occur with any other forms... eg if you move the login form into the header - well that actually uses the .region-header .form-text. Anyhow I think this issue indicates we have a bigger problem with places forms in the header and footer regions of bartik.

EDIT: fix code block

nathanlawsn’s picture

Assigned: Unassigned » nathanlawsn
nathanlawsn’s picture

Assigned: nathanlawsn » Unassigned
Status: Needs work » Needs review
Issue tags: +Amsterdam2014
FileSize
378 bytes

Submitting patch which fixes the issue.

criscom’s picture

Going to test the patch.

olav’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
105.4 KB

The patch applied cleanly for me.
It even does the right thing -
screenshot of frontend with applied patch

Rade’s picture

I also tested this and the latest patch works fine. Agreeing with the RTBC.

Rade’s picture

Issue summary: View changes
FileSize
11.94 KB
yanniboi’s picture

The patch in number 11 addresses @alexpott's concern about region specific text. The color of the text in the form element does not have a sensible default which is why the color of a region impacts it (eg. white in header). The new patch sets a default color on form elements. Since the default for form element backgrounds is white everywhere on the site, grey is a good default for the color and will not have any negative side effects elsewhere.

The color #3b3b3b that was chosen to be the default was chosen because that is the color of the text in other regions (eg. first sidebar or content).

emma.maria’s picture

Before the search element was moved to the header it was using #3b3b3b as the text color.
Therefore it should keep this colour in the header and the most recent patch contains this.
110% agree with RTBC, great work @nathanlawson91!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 67af636 and pushed to 8.0.x. Thanks!

Thanks for addressing my concerns.

  • alexpott committed 67af636 on 8.0.x
    Issue #2281451 by xgen2, Mukeysh, nathanlawson91 | a_thakur: Fixed...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.