[Webkit-unassigned] [Bug 230152] New: Web Inspector: console.log breaks test into separate elements when a line-break is present / line-height truncates text but does not shrink actual element below original height
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 10 07:36:57 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=230152
Bug ID: 230152
Summary: Web Inspector: console.log breaks test into separate
elements when a line-break is present / line-height
truncates text but does not shrink actual element
below original height
Product: WebKit
Version: WebKit Nightly Build
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: Web Inspector
Assignee: webkit-unassigned at lists.webkit.org
Reporter: brandon at dreamthinkbuild.com
CC: inspector-bugzilla-changes at group.apple.com
Created attachment 437870
--> https://bugs.webkit.org/attachment.cgi?id=437870&action=review
screenshot of space between multi-line console log renders
Steps to reproduce:
When using console.log() to log multiple lines of text to the console, using `\n` or `\x0a` to break text onto new lines, there is an undesirable space between the lines of text that occurs when decreasing the font-size of the console log output (using `%c`). This space does not occur, however, at the default font-size or when increasing the font-size using the same method.
This can be seen most clearly by styling multiple lines of text to include a background-color, as I demonstrate in the example scripts below. Run these three scripts to see the effects of each (pictured in the attached screenshot):
(1) `console.log('%ctest\n%ctest', 'background-color: #f00', 'background-color: #00f')`
(2) `console.log('%ctest\n%ctest', 'background-color: #f00; font-size: 200%', 'background-color: #00f; font-size: 200%')`
(3) `console.log('%ctest\n%ctest', 'background-color: #f00; font-size: 50%', 'background-color: #00f; font-size: 50%')`
==========================
Actual results:
Currently, adding a line break `\n` or `\x0a` causes the logged output to split into separate lines with a gap in-between.
==========================
Expected results:
There should be no gap between multiple lines of text logged to the console by default, at any font-size, unless a specific and greater line-height is specified.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210910/30430053/attachment.htm>
More information about the webkit-unassigned
mailing list