Make WordPress Core

Opened 6 weeks ago

Last modified 5 weeks ago

#61800 new defect (bug)

Twenty Twelve: preformatted elements have hyphens on front-end

Reported by: viralsampat's profile viralsampat Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.6.1
Component: Bundled Theme Keywords: dev-feedback has-patch changes-requested
Focuses: css Cc:

Description

Hello Team,

I have reviewed the "Preformatted block" and found that the "hyphens" character is adding in text on front-end when we changed its "Letter spacing" from "Typography" setting.

So, I think that the editor side text & front-side text should be same.

Here, I have attached its screenshots and video for references.

Thanks,

Attachments (9)

twenty-twelve-preformatted-block-editor.png (274.6 KB) - added by viralsampat 6 weeks ago.
Back-end:
twenty-twelve-preformatted-block-front-end.png (246.0 KB) - added by viralsampat 6 weeks ago.
Front-end:
twenty-twelve-preformatted-block-issue.mp4 (1.5 MB) - added by viralsampat 6 weeks ago.
Issue video:
61800.patch (424 bytes) - added by viralsampat 6 weeks ago.
I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.
after-resolved-twenty-twelve-preformatted-block-editor.png (284.7 KB) - added by viralsampat 6 weeks ago.
After resolved issue Back-end:
after-resolved-twenty-twelve-preformatted-block-front-end.png (241.0 KB) - added by viralsampat 6 weeks ago.
After resolved issue front-end:
2012-preformatted-text-hyphens.png (57.2 KB) - added by sabernhardt 6 weeks ago.
(before patch) hyphens in post content and widget area, with the default font size and letter spacing
61800.2.patch (471 bytes) - added by viralsampat 6 weeks ago.
I have updated my patch.
61800.3.patch (471 bytes) - added by viralsampat 5 weeks ago.
As per coding standard, I have updated my patch.

Change History (11)

@viralsampat
6 weeks ago

I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.

@viralsampat
6 weeks ago

After resolved issue Back-end:

@viralsampat
6 weeks ago

After resolved issue front-end:

@sabernhardt
6 weeks ago

(before patch) hyphens in post content and widget area, with the default font size and letter spacing

#1 @sabernhardt
6 weeks ago

  • Component changed from General to Bundled Theme
  • Keywords has-patch added; needs-patch needs-testing removed
  • Summary changed from The Preformatted block text add hyphens on front-end side on twenty twelve theme. to Twenty Twelve: preformatted elements have hyphens on front-end

Preformatted text can have automatic hyphens with the theme without adjusting the font size or letter spacing.

When using a modern browser, the patch removes the hyphens for any pre element within the post content area.

Additional changes to consider:

  1. Twenty Twelve adds -webkit- and -moz- vendor prefixes for hyphens. The need for these may be rare, but including them would be consistent with the theme's styles for .site-content article and .widget-area .widget.
  2. Preformatted blocks in a widget area can still hyphenate. The override could be added for any pre element (possibly placed at line 506, after the a:hover ruleset).
pre {
	-webkit-hyphens: none;
	-moz-hyphens: none;
	hyphens: none;
}
Last edited 6 weeks ago by sabernhardt (previous) (diff)

@viralsampat
6 weeks ago

I have updated my patch.

#2 @sabernhardt
5 weeks ago

  • Keywords changes-requested added

According to coding standards, the prefixed properties belong before the unprefixed property.

	-webkit-hyphens: none;
	-moz-hyphens: none;
	hyphens: none;

@viralsampat
5 weeks ago

As per coding standard, I have updated my patch.

Note: See TracTickets for help on using tickets.