-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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(normalizaProp): support css variable as number #6636
Conversation
packages/shared/src/domAttrConfig.ts
Outdated
@@ -63,6 +63,7 @@ export const isNoUnitNumericStyleProp = /*#__PURE__*/ makeMap( | |||
`grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,` + | |||
`grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,` + | |||
`line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,` + | |||
`-webkit-line-clamp,` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only adding this doesn't make sense, since every property here are non-prefixed standard properties. There are most likely other prefixed versions of some other properties that can be treated as numbers, and it is impractical for us to support all of them.
I think just supporting custom properties is good enough in this PR. Whether we want to support vendor-prefixed properties is a separate problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll remove it.
I decided to remove the unit check altogether since due to vendor prefixes and custom properties, the check seems to be unnecessarily strict for little value (for the end user, the browser render result will be the same). |
Previously this prevented custom properties and vendor-prefixed properties to be rendered correctly. fix vuejs#6625
Previously this prevented custom properties and vendor-prefixed properties to be rendered correctly. fix vuejs#6625
fix #6625