[web] Remove unnecessary CSS styles on <p> elements#32043
[web] Remove unnecessary CSS styles on <p> elements#32043mdebbar merged 9 commits intoflutter:mainfrom
Conversation
|
Gold has detected about 5 new digest(s) on patchset 6. |
ditman
left a comment
There was a problem hiding this comment.
LGTM! Small question about the "new spans"
| lastSpanElement = html.document.createElement('span') as html.HtmlElement; | ||
| lastSpanElement = html.document.createElement('flt-span') as html.HtmlElement; |
There was a problem hiding this comment.
Custom elements behave like divs right? Do you need display: inline (or inline-block) to retain what was special of using a span tag earlier? Or are we just doing display:block on everything?
There was a problem hiding this comment.
That's a good point.
The display property doesn't matter anymore. Each <flt-span> contains a single fragment of text that can't be broken into multiple lines.
A single line of text that is positioned absolutely shouldn't be affected by display:block or display:inline.
|
Gold has detected about 6 new digest(s) on patchset 9. |

With #31907, we started to absolutely position all the spans inside the paragraph, so there's no layout/alignment happening by the DOM. This means we can remove all the CSS styles that were used to make the browser lay things out correctly.
<p>and<span>elements to<flt-paragraph>and<flt-span>respectively.