Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Mar 12, 2024
1 parent 2d1c426 commit f23a60d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rules/color-contrast-matches.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ function colorContrastMatches(node, virtualNode) {
//check to see if the rectangle impinges
const overlaps = visuallyOverlaps(rect, node);

if (!overflowNodes.length) {
if (!clippingAncestors.length) {
return overlaps;
}

const withinOverflow = overflowNodes.some(overflowNode => {
const withinOverflow = clippingAncestors.some(overflowNode => {
return rectsOverlap(rect, overflowNode.boundingClientRect);
});

return overlapps && withinOverflow;
return overlaps && withinOverflow;
});
}

Expand Down

0 comments on commit f23a60d

Please sign in to comment.