Skip to content

增加 textDecorationLine: underline line-through 编译和运行时抹平#2504

Merged
hiyuki merged 31 commits into
style-enhancementfrom
style-enhancement-text-decoration
Jun 11, 2026
Merged

增加 textDecorationLine: underline line-through 编译和运行时抹平#2504
hiyuki merged 31 commits into
style-enhancementfrom
style-enhancement-text-decoration

Conversation

@wenwenhua

@wenwenhua wenwenhua commented May 28, 2026

Copy link
Copy Markdown
Collaborator

bugfix:
1.text-decoration 编译时处理支持 text-decoration: underline line-through
2.transform编译&运行时处理(支持 matrix 6位、matrix3d、rotate3d)
3.编译指定background-position x y 顺序
4.fix fix background-sizde cover contain 问题
5.boxShadow 不生效问题,保留 px 单位,仅处理 rpx 转 px
运行时feature:
1 background-position x y 顺序
2 text-decoration: underline line-through
3 去掉简写属性不支持单个css var的逻辑(已测试)

const [a, b, c, d, tx, ty] = matrixValues
transform.push({ matrix: [a, b, 0, 0, c, d, 0, 0, 0, 0, 1, 0, tx, ty, 0, 1] })
} else {
error(`Value of [transform] in ${selector} does not support matrix with ${matrixValues.length} values, only 16 values are supported in ${mode} environment!`)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这不应该是只支持6值么

const [a, b, c, d, tx, ty] = matrixValues
transform.push({ matrix: [a, b, 0, 0, c, d, 0, 0, 0, 0, 1, 0, tx, ty, 0, 1] })
} else {
error(`Transform matrix only supports 16 values in React Native, got ${matrixValues.length}`)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

6值

}))
break
}
case 'rotate3d': {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

rotate3d好像支持单值0 看mdn上

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

你也确认一下支持别的单值或者多值么

}
}

function transformTextDecoration (styleObj: Record<string, any>) {

@hiyuki hiyuki Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

同编译时处理流程拉齐

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这个可以直接合到transformShorthand里吧

@hiyuki hiyuki merged commit 5ac8601 into style-enhancement Jun 11, 2026
6 of 9 checks passed
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.

2 participants