[wp-trac] [WordPress Trac] #61800: Twenty Twelve: preformatted elements have hyphens on front-end (was: The Preformatted block text add hyphens on front-end side on twenty twelve theme.)
WordPress Trac
noreply at wordpress.org
Thu Aug 1 22:43:45 UTC 2024
#61800: Twenty Twelve: preformatted elements have hyphens on front-end
------------------------------------+------------------------------
Reporter: viralsampat | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 6.6.1
Severity: normal | Resolution:
Keywords: dev-feedback has-patch | Focuses: css
------------------------------------+------------------------------
Changes (by sabernhardt):
* keywords: needs-patch dev-feedback needs-testing => dev-feedback has-
patch
* component: General => Bundled Theme
Comment:
Preformatted text can have automatic hyphens with the theme without
adjusting the font size or letter spacing.
The patch removes the hyphens for any `pre` element within the `entry-
content` when using a modern browser.
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;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61800#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list