fix: resolve CLS issues in page layout #209
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
修复网页加载时页面布局的 CLS 问题,这个问题由 halo-dev/halo#6580 引发,因为之前的侧边栏布局采用 flex 布局,会导致在分块传输过程中,首先左边内容会自动铺满宽度,等侧边传输完成后又会改变会正常的布局,从而导致 CLS 问题,这个 PR 只是通过 CSS 规避这个问题,我建议重新考虑是否要在 Halo 中默认启用分块传输。
Screen.Recording.2024-11-15.at.21.28.18.mov
Screen.Recording.2024-11-15.at.21.29.46.mov
cc @JohnNiang
/kind improvement