Issue
The whitespace of text within a <p>
tag is significant and is reflected in the UI by default. Setting the white-space: normal
changes this behavior to the default browser behavior.
Steps to reproduce
- Create a
<dialog>
and place a <p>
inside it with multi-line text
Expected Behavior
Whitespace not to be visible in the UI.
Actual Behavior
Whitespace is visible in the browser, similarly to when we use white-space: pre
in the browser.
I believe this is a known issue @kerrishotts can confirm this. Thanks for reporting it - we are working on getting as close to browser standards as possible soon!
What host.minVersion
are you using in your plugin?
"minVersion": "20.0"
@kerrishotts
For the latest prerelease (and XD 21), switch to minVersion: 21
. This will use the newer, more standard layout (ignoring whitespace)
@kerrishotts the white-space: pre
is fixed in v21.
Unrelated to the white-space, I’m seeing two issues in v21:
- The
width
and height
attributes of an img
are ignored. E.g., <img width="25" height="44">
. Using style="width: 25px; height: 44px"
sets the image dimensions as expected.
- Anchors’ color (e.g.,
color: #fff
) can no longer be set with css. Setting it via style="color: #fff"
works. This is an issue for anchors on a dark background, where the default blue doesn’t have enough contrast to be accessible.