Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Auto add('px') on bindCSS setter for integers ? #16

Open
QuentinRoy opened this issue Aug 18, 2014 · 0 comments
Open

Auto add('px') on bindCSS setter for integers ? #16

QuentinRoy opened this issue Aug 18, 2014 · 0 comments

Comments

@QuentinRoy
Copy link

When a given css property is a number, jquery automatically add the 'px' suffix.
Exceptions are (from jquery source code):

{
        "columnCount": true,
        "fillOpacity": true,
        "flexGrow": true,
        "flexShrink": true,
        "fontWeight": true,
        "lineHeight": true,
        "opacity": true,
        "order": true,
        "orphans": true,
        "widows": true,
        "zIndex": true,
        "zoom": true
    }

I kind of like this behavior... And I guess if jquery does it, it is safe. I think cjs should do the same.

Another arguments in favor of this functionality:
The behavior of cjs regarding this depends of the html doctype balise on top of the page it is included... Yeah I just lost 2 hours trying to understand why the exact same code didn't work anymore in a (almost) similar condition.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant