Skip to content

Commit

Permalink
Fix border drawn over children
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Jun 4, 2024
1 parent 033a55f commit 54c2c79
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,9 @@ - (void)invalidateLayer
// iOS draws borders in front of the content whereas CSS draws them behind
// the content. For this reason, only use iOS border drawing when clipping
// or when the border is hidden.
borderMetrics.borderWidths.left == 0 ||
colorComponentsFromColor(borderMetrics.borderColors.left).alpha == 0 || self.clipsToBounds);
borderMetrics.borderWidths.left == 0 || self.clipsToBounds ||
(colorComponentsFromColor(borderMetrics.borderColors.left).alpha == 0 &&
(*borderMetrics.borderColors.left).getUIColor() != nullptr));

CGColorRef backgroundColor = [_backgroundColor resolvedColorWithTraitCollection:self.traitCollection].CGColor;

Expand Down

0 comments on commit 54c2c79

Please sign in to comment.