-
Notifications
You must be signed in to change notification settings - Fork 304
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
overflow:hidden失效 #1446
Labels
bug
Something isn't working
Comments
overflow.dart bool get clipX {
RenderBoxModel renderBoxModel = this as RenderBoxModel;
// Recycler layout not need repaintBoundary and scroll/pointer listeners,
// ignoring overflowX or overflowY sets, which handle it self.
if (renderBoxModel is RenderSliverListLayout) {
return false;
}
List<Radius>? borderRadius = renderBoxModel.renderStyle.borderRadius;
// The content of replaced elements is always trimmed to the content edge curve.
// https://www.w3.org/TR/css-backgrounds-3/#corner-clipping
if( borderRadius != null
&& this is RenderReplaced
&& renderStyle.intrinsicRatio != null
) {
return true;
}
// Overflow value other than 'visible' always need to clip content.
// https://www.w3.org/TR/css-overflow-3/#overflow-properties
CSSOverflowType effectiveOverflowX = renderStyle.effectiveOverflowX;
if (effectiveOverflowX != CSSOverflowType.visible) {
Size scrollableSize = renderBoxModel.scrollableSize;
Size scrollableViewportSize = renderBoxModel.scrollableViewportSize;
// Border-radius always to clip inner content when overflow is not visible.
if (scrollableSize.width > scrollableViewportSize.width
|| borderRadius != null
) {
return true;
}
}
return false;
} if (scrollableSize.width > scrollableViewportSize.width |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用的 Kraken 版本 | What version of kraken are you using
master
重现步骤 | Steps To Reproduce
重现代码 | Code example:
预期结果 | Expected results:
实际结果 | Actual results:
The text was updated successfully, but these errors were encountered: