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

fix: br element size #867

Merged
merged 21 commits into from
Dec 16, 2021
Merged

fix: br element size #867

merged 21 commits into from
Dec 16, 2021

Conversation

temper357
Copy link
Contributor

Closes #737

修复 BR element 高度不生效,BR element 是一个特殊的 element,设置任何 style 都不生效,同时高度只由 parent 的 line-height 决定,由于 HTML 规范中定义 BR element 实际上会被转化成一个换行符 https://www.w3.org/TR/CSS1/#br-elements ,因此 Kraken 通过渲染一个空字符串来获取换行的真实高度。

Base automatically changed from feat-css-style-sheet to main November 19, 2021 14:03
Copy link
Member

@wssgcg1213 wssgcg1213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要再改一下

@temper357
Copy link
Contributor Author

浏览器对 BR element 设置 style 是生效的,也能正常读出,只是渲染不生效,因此不能使用在 bridge 侧阻断 style 指令的方式实现。

@yuanyan yuanyan self-requested a review December 13, 2021 15:06
@wssgcg1213 wssgcg1213 merged commit ae2d910 into main Dec 16, 2021
@wssgcg1213 wssgcg1213 deleted the fix/br-element-size branch December 16, 2021 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

连续多个 br 时只有一个生效
3 participants