Make WordPress Core

Opened 6 months ago

Last modified 7 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:
Component: Bundled Theme Keywords: has-patch needs-testing
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 months ago.
Back-end:
twenty-twelve-preformatted-block-front-end.png (246.0 KB) - added by viralsampat 6 months ago.
Front-end:
twenty-twelve-preformatted-block-issue.mp4 (1.5 MB) - added by viralsampat 6 months ago.
Issue video:
61800.patch (424 bytes) - added by viralsampat 6 months 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 months ago.
After resolved issue Back-end:
after-resolved-twenty-twelve-preformatted-block-front-end.png (241.0 KB) - added by viralsampat 6 months ago.
After resolved issue front-end:
2012-preformatted-text-hyphens.png (57.2 KB) - added by sabernhardt 6 months 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 months ago.
I have updated my patch.
61800.3.patch (471 bytes) - added by viralsampat 6 months ago.
As per coding standard, I have updated my patch.

Change History (14)

@viralsampat
6 months 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 months ago

After resolved issue Back-end:

@sabernhardt
6 months ago

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

#1 @sabernhardt
6 months 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 months ago by sabernhardt (previous) (diff)

@viralsampat
6 months ago

I have updated my patch.

#2 @sabernhardt
6 months 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
6 months ago

As per coding standard, I have updated my patch.

#3 @sabernhardt
5 months ago

  • Keywords dev-feedback changes-requested removed
  • Version 6.6.1 deleted

#4 @karmatosed
7 weeks ago

I am going to test this and see about progressing this into a commit as the hyphens are now in as per @sabernhardt's suggestion. Thank you everyone.

#5 @karmatosed
7 weeks ago

  • Keywords needs-testing added

I just tested this and I am unable to replicate the original issue. I am curious if others are today?

Note: See TracTickets for help on using tickets.