Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isClippedBySize() does not account for cases where the grandparent of a text node fully indents and clips text #731

Closed
1 task done
Jym77 opened this issue Mar 2, 2021 · 1 comment · Fixed by #848
Closed
1 task done
Assignees
Labels
bug Report of unexpected or faulty behaviour in Alfa

Comments

@Jym77
Copy link
Contributor

Jym77 commented Mar 2, 2021

isClippedBySize() currently returns false for the following text node:

<style>
  div {
    overflow-x: hidden;
    text-indent: 100%;
    white-space: nowrap;
  }
</style>

<div>
  <span>This is invisible</span>
</div>
@Jym77 Jym77 added the bug Report of unexpected or faulty behaviour in Alfa label Mar 2, 2021
@kasperisager kasperisager changed the title isClippedBySize should consider all ancestor when looking for hidden overflow isClippedBySize() does not account for cases where the grandparent of a text node fully indents and clips text Mar 2, 2021
@kasperisager
Copy link
Contributor

Adjusted the title and description to clarify the issue at hand, not the proposed solution. The issue with simply looking further up the tree for a computed overflow-x is that, for some reason, many pages declare overflow-x: hidden near the document root (<body> or <html>).

For lack of a layout system, I'd rather we assume that text-indent: -100% or text-indent: 100%; white-space: nowrap means that the text will be invisible, regardless of overflow-x. There might be other pitfalls to that so let's examine those a little further at a refinement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of unexpected or faulty behaviour in Alfa
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants