Skip to content

Bug: Css scale style Property can be added as a unitlessNumber #26173

@Biki-das

Description

@Biki-das

we have scale property in css .

In Plain JavaScript, we can directly pass a Number type and change the scale value like below

const myDiv = document.querySelector('.div')
myDiv.style.scale = 2.5

scale:2.5 simulates the shorthand for transform: scale(2.5)

Similarly I tried to do the Above in React, but it does not work as of now and only can work with string, the fix i took is adding it as a unitless Number in the css.property.js file since it accepts the css properties accepting number , doing the same and running the fixtures standalone file , it is working the way as i expected

Before the changes

Untitled.1.mp4

After the changes

Untitled.2.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions