Twenty Nineteen: Replace whitespace character for heading decoration.#12121
Twenty Nineteen: Replace whitespace character for heading decoration.#12121KarunyaChavan wants to merge 1 commit into
Conversation
…nt stray hyphen. - Replaces `content: "\020"` with `content: ""` in the `post-section-dash` mixin. - Prevents a visible hyphen from rendering in the editor when an empty heading block has the underline text decoration active.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Trac ticket: https://core.trac.wordpress.org/ticket/65433
When a user inserts an empty heading block in the editor and applies an "Underline" or "Strikethrough" text decoration, the browser attempts to underline the pseudo-element's whitespace character. This interaction causes a stray, visible hyphen-like artifact to render inside the editor above the empty block as
What this Changes
post-section-dashmixin insass/mixins/_mixins-master.scssto use an empty string (content: "";) instead ofcontent: "\020".display: block,width, andheightproperties, the decorative dash continues to render identically on the frontend and backend.Use of AI Tools
AI assistance: Yes
Tool(s): GitHub Copilot
Model(s): GPT-4o
Used for: To verify optimality and efficiency of the patch.