Opened 19 months ago
Closed 19 months ago
#61888 closed defect (bug) (fixed)
Twenty Seventeen: Search block button's styles are not set in the editor
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.7 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Bundled Theme | Keywords: | has-patch needs-testing commit |
| Focuses: | css | Cc: |
Description
Hello Team,
I have checked "Search Block" and found that it's button background color, text color, and font-weight is not same on back-end & front-end.
I think that it should be same on the both sides(Back-end & Front-end).
Here, I have provided its screenshots for reference.
Thanks,
Attachments (8)
Change History (18)
#2
@
19 months ago
- Keywords dev-feedback needs-testing removed
- Milestone changed from Awaiting Review to Future Release
- Summary changed from Twenty seventeen theme: Search block button's behaviour not same on editor and front-end. to Twenty Seventeen: Search block button's styles are not set in the editor
The editor-blocks stylesheet needs styles to match button styles on the front end.
/* Search */
.wp-block-search__button {
background-color: #222;
color: #fff;
font-size: 16px;
font-weight: 800;
line-height: 1.5;
}
#4
@
19 months ago
- Keywords needs-testing added
- Milestone changed from Future Release to 6.7
I am going to test this now thanks.
#5
@
19 months ago
I can confirm this patch now resolves it being the same in both experiences. Thank you everyone.
#7
@
19 months ago
- Owner set to karmatosed
- Resolution set to fixed
- Status changed from new to closed
In 58911:
@
19 months ago
option 2: removes font size, moves new rules, and adds some styles for the Search block label and input
@
19 months ago
Search blocks with default styling and large font size preset in both post content and a widget, on the front end
#8
@
19 months ago
- Keywords commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
This should have an iteration, and I uploaded two options.
- I was wrong about adding a
font-sizein the button styles. The theme uses the same size forbodyandbutton, and my suggestion would override theme preset classes for font size. - The new styles are located in the middle of the Quote block's styles. They would fit better in the Widgets section, at the end of the file.
- The label and input are slightly different in the editor, though I am not sure whether trying to match those to the front is worth an extra 15 lines. I chose not to copy the theme's form element styles into
editor-style.css(form elements can be used in other situations, but that is about 100 lines and the Search label still would need its own rules).
Extra styles to consider in 61888.label-input-button.patch:
- The label sets a
font-weightof700in the editor and800on the front (which does not look any different for me because the theme does not have font files for the700weight). - The label's
0.5emmargin on the front is missing in the editor, and that is more noticeable with larger fonts. - Adding the input's
#333text color would override the admin styles (forms.css, which give the search input a very similar#2c3338. I also included the background color and gradient to make sure it has contrast. - The input border radius is also very similar to the admin styles (3 pixels instead of 4).
- Inputs have a lighter border in Twenty Seventeen than what admin styles or the
block-librarystyles define. - The input padding and
line-heightcould also match the front end.
Back-end: