Skip to content

Treat CSS aspect-ratio, scale & a few others as unitless #5179

Closed
@ukcbajr

Description

Found an issue when using .css('aspect-ratio', x);

If x is a number, 'px' seems to be added, causing the attribute to not be set.

Looks like 'aspectRatio' needs to be added to cssNumber definition.

My current work-around is to convert x to a string, e.g. use .css('aspect-ratio', x+'');

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions