[wp-trac] [WordPress Trac] #48915: Gutenberg Paragraph Block, Drop Cap missing sanitize rule for initial hard return line <br>
WordPress Trac
noreply at wordpress.org
Fri Jan 10 20:03:45 UTC 2020
#48915: Gutenberg Paragraph Block, Drop Cap missing sanitize rule for initial hard
return line <br>
--------------------------+------------------------------
Reporter: Giorgio25b | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.3
Severity: minor | Resolution:
Keywords: needs-patch | Focuses: ui
--------------------------+------------------------------
Comment (by apieschel):
Was able to reproduce. This is indeed not ideal, but I don't think this is
a bug specific to the editor that can be patched. My impression is this is
just how the :first-letter CSS selector works. From /wp-includes/css/dist
/block-library/style.css, here's the CSS that's targeting the drop-cap
styles:
{{{
.has-drop-cap:not(:focus):first-letter {
float: left;
font-size: 8.4em;
line-height: .68;
font-weight: 100;
margin: .05em .1em 0 0;
text-transform: uppercase;
font-style: normal;
}
}}}
In any context, if there's an element inside the <p> tags before the inner
text (such as the <br> in your example), then the :first-letter selector
will have no effect.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48915#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list