Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(components/Row): fix black bg on two-color char tail not causing …
…visual effects This issue was described in commit a75d550 ("Fix two-color character rendering bug when the right-half is black."). This issue was caused by the HTML layout of two-color chars, e.g.: ```html <span class="q15 b1"> <!-- Non-black BG. --> <span class="q15 b1 rb0 wpadding" data-text="A" style="display: inline-block; width: 24px;"> A </span> <!-- "Black" (transparent) right-half BG., appeared as non-black --> M </span> ``` To fix this issue, WordSegmentBuilder is specialized for two-color chars (as JavaScript class TwoColorWordBuilder) so as to instead generate such layout as: ```html <span class="q15 b1 rb0 wpadding" data-text="A" style="display: inline-block; width: 24px;"> A </span> <span class="q15 b1"> M </span> ``` This not only avoids the unwanted background color introduced by the outer span but also eliminates the unnecessary outer span for a sole two-color char. Note that this requires the fix introduced in commit d6ebaab ("feat: rework two-color-word effect & implement blinking") to make the un-nested span rendered expectedly.
- Loading branch information