Skip to content

Commit d51bf2e

Browse files
committed
fix: improve visible-overflow-no-text-overflow test.html visual clarity
- Add background color to all warn and ok cases - Warn labels note "text spills out instead of showing ..." - Ok labels describe visible effect (truncated with "...", scrollbar) - Remove trivial ok cases (default clip, display:contents, overflow:auto) - Keep input and vertical writing mode ok cases as meaningful edge cases
1 parent d722e39 commit d51bf2e

1 file changed

Lines changed: 45 additions & 43 deletions

File tree

examples/test.html

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3808,78 +3808,90 @@ <h2>visible-overflow-no-text-overflow: text-overflow on visible overflow</h2>
38083808
<h3>Should warn</h3>
38093809
<div class="case expect-warn" data-rule="visible-overflow-no-text-overflow">
38103810
<div class="label label-warn">
3811-
visible-overflow-no-text-overflow warn: ellipsis with default overflow (visible)
3811+
visible-overflow-no-text-overflow warn: ellipsis — overflow is visible, text spills out
3812+
instead of showing "..."
38123813
</div>
3813-
<div data-target style="text-overflow: ellipsis; white-space: nowrap; width: 150px">
3814-
This text should be truncated but overflow is visible
3814+
<div
3815+
data-target
3816+
style="text-overflow: ellipsis; white-space: nowrap; width: 150px; background: #e8e8e8"
3817+
>
3818+
This long text should show ellipsis but overflows instead
38153819
</div>
38163820
</div>
38173821
<div class="case expect-warn" data-rule="visible-overflow-no-text-overflow">
38183822
<div class="label label-warn">
3819-
visible-overflow-no-text-overflow warn: ellipsis explicitly with overflow: visible
3823+
visible-overflow-no-text-overflow warn: ellipsis + explicit overflow: visible — same issue
38203824
</div>
38213825
<div
38223826
data-target
3823-
style="text-overflow: ellipsis; overflow: visible; white-space: nowrap; width: 150px"
3827+
style="
3828+
text-overflow: ellipsis;
3829+
overflow: visible;
3830+
white-space: nowrap;
3831+
width: 150px;
3832+
background: #e8e8e8;
3833+
"
38243834
>
3825-
Explicit overflow: visible with text-overflow: ellipsis
3835+
Explicit overflow: visible text spills out, no ellipsis
38263836
</div>
38273837
</div>
38283838

38293839
<h3>Should NOT warn</h3>
38303840
<div class="case expect-ok" data-rule="visible-overflow-no-text-overflow">
38313841
<div class="label label-ok">
3832-
visible-overflow-no-text-overflow ok: ellipsis with overflow: hidden (correct usage)
3833-
</div>
3834-
<div
3835-
data-target
3836-
style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap; width: 150px"
3837-
>
3838-
This text is properly truncated with overflow hidden and ellipsis
3839-
</div>
3840-
</div>
3841-
<div class="case expect-ok" data-rule="visible-overflow-no-text-overflow">
3842-
<div class="label label-ok">
3843-
visible-overflow-no-text-overflow ok: default text-overflow (clip) with visible overflow
3844-
</div>
3845-
<div data-target style="width: 150px">Default text-overflow is clip, no warning needed</div>
3846-
</div>
3847-
<div class="case expect-ok" data-rule="visible-overflow-no-text-overflow">
3848-
<div class="label label-ok">
3849-
visible-overflow-no-text-overflow ok: ellipsis with overflow: scroll
3842+
visible-overflow-no-text-overflow ok: overflow: hidden — text truncated with "..." visible
38503843
</div>
38513844
<div
38523845
data-target
3853-
style="text-overflow: ellipsis; overflow: scroll; white-space: nowrap; width: 150px"
3846+
style="
3847+
text-overflow: ellipsis;
3848+
overflow: hidden;
3849+
white-space: nowrap;
3850+
width: 150px;
3851+
background: #e8e8e8;
3852+
"
38543853
>
3855-
text-overflow with overflow: scroll is valid
3854+
This long text is properly truncated with ellipsis showing
38563855
</div>
38573856
</div>
38583857
<div class="case expect-ok" data-rule="visible-overflow-no-text-overflow">
38593858
<div class="label label-ok">
3860-
visible-overflow-no-text-overflow ok: ellipsis with overflow: auto
3859+
visible-overflow-no-text-overflow ok: overflow: scroll — text truncated, scrollbar visible
38613860
</div>
38623861
<div
38633862
data-target
3864-
style="text-overflow: ellipsis; overflow: auto; white-space: nowrap; width: 150px"
3863+
style="
3864+
text-overflow: ellipsis;
3865+
overflow: scroll;
3866+
white-space: nowrap;
3867+
width: 150px;
3868+
background: #e8e8e8;
3869+
"
38653870
>
3866-
text-overflow with overflow: auto is valid
3871+
text-overflow with overflow: scroll
38673872
</div>
38683873
</div>
38693874
<div class="case expect-ok" data-rule="visible-overflow-no-text-overflow">
38703875
<div class="label label-ok">
3871-
visible-overflow-no-text-overflow ok: ellipsis with overflow-x: clip
3876+
visible-overflow-no-text-overflow ok: overflow-x: clip — text clipped at boundary
38723877
</div>
38733878
<div
38743879
data-target
3875-
style="text-overflow: ellipsis; overflow-x: clip; white-space: nowrap; width: 150px"
3880+
style="
3881+
text-overflow: ellipsis;
3882+
overflow-x: clip;
3883+
white-space: nowrap;
3884+
width: 150px;
3885+
background: #e8e8e8;
3886+
"
38763887
>
3877-
text-overflow with overflow-x: clip is valid
3888+
text-overflow with overflow-x: clip
38783889
</div>
38793890
</div>
38803891
<div class="case expect-ok" data-rule="visible-overflow-no-text-overflow">
38813892
<div class="label label-ok">
3882-
visible-overflow-no-text-overflow ok: input with text-overflow: ellipsis (UA styles)
3893+
visible-overflow-no-text-overflow ok: input — UA stylesheet sets overflow: hidden, "..."
3894+
visible in narrow input
38833895
</div>
38843896
<input
38853897
data-target
@@ -3888,16 +3900,6 @@ <h3>Should NOT warn</h3>
38883900
value="Long input text that should be truncated"
38893901
/>
38903902
</div>
3891-
<div class="case expect-ok" data-rule="visible-overflow-no-text-overflow">
3892-
<div class="label label-ok">
3893-
visible-overflow-no-text-overflow ok: display:contents (no box, skip)
3894-
</div>
3895-
<div style="display: flex">
3896-
<div data-target style="display: contents; text-overflow: ellipsis">
3897-
<span>Child of contents element</span>
3898-
</div>
3899-
</div>
3900-
</div>
39013903
<div class="case expect-ok" data-rule="visible-overflow-no-text-overflow">
39023904
<div class="label label-ok">
39033905
visible-overflow-no-text-overflow ok: vertical writing mode with overflow-y hidden

0 commit comments

Comments
 (0)