Skip to content

Whitespace spans collapse in browser #193

@vvmnnnkv

Description

@vvmnnnkv

Hi,

I would like to understand how much is this a desired behavior.
Consider following example:

<p><span tts:fontStyle="italic">1 </span><span tts:textDecoration="underline"> </span><span tts:fontStyle="bold"> 2</span></p>

When parsed by generateISD, the resulting elements are: [1 ][ ][ 2]
In theory this should be rendered as:   2
(i.e. include 3 whitespaces of different styles)

Checking result in DOM inspector, all spans are added, however, browser collapses whitespace spans so only the first one is visible.

image
image

If this is desired behavior, it would be nice to include this logic in generateISD and collapse whitespace spans there (just like whitespace chars are collapsed inside spans).

Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions