-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
In CSS, v-bind() should not add custom properties to the component's style attribute when their value is undefined. #7474
Copy link
Copy link
Closed
Labels
🧹 p1-chorePriority 1: this doesn't change code behavior.Priority 1: this doesn't change code behavior.scope: sfc-style-vars
Description
Vue version
3.2.45
Link to minimal reproduction
Steps to reproduce
- Create a component with an optional property
v-bindthe property in CSS- Use the component without specifying the optional property
What is expected?
As null values are not added to the style attribute, undefined values should not be added either.
What is actually happening?
The optional property is added to the style attribute with a value of undefined.
System Info
System:
OS: macOS 13.1
CPU: (10) arm64 Apple M1 Pro
Memory: 330.34 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.9.1 - ~/.nvm/versions/node/v18.9.1/bin/node
Yarn: 1.21.1 - ~/.nvm/versions/node/v18.9.1/bin/yarn
npm: 8.19.1 - ~/.nvm/versions/node/v18.9.1/bin/npm
Browsers:
Chrome: 108.0.5359.124
Edge: 108.0.1462.54
Firefox: 108.0.2
Safari: 16.2Any additional comments?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🧹 p1-chorePriority 1: this doesn't change code behavior.Priority 1: this doesn't change code behavior.scope: sfc-style-vars