I had to convert my background-position css from left top to 0 0, although the documentation said it would work.
There is a comment around line 50-55 regarding the background positioning values:
// Only keywords or percentage values are supported
backgroundPositionX: positions[ pos[0] ] || parseFloat( pos[0] ) / 100,
backgroundPositionY: positions[ pos[1] ] || parseFloat( pos[1] ) / 100
Does "Only keywords ..." mean "left", "center", etc. or is there something I missed? The documentation (here at Github) states:
lengths (px, em, etc.) in background-position (only percentages and keywords such as > center work)
as criteria for the background-position value.
If I use left top instead of 0 0 the script errors out, declaring the value of backgroundPositionX/Y as NaN (leaving me with no image at all). After I switched in 0 0 the script worked just fine.
Is this a mistake or is the documentation outdated/incorrect?
(I didn't try out the minified version, could be that this works fine in that version.)
I had to convert my
background-position
css fromleft top
to0 0
, although the documentation said it would work.There is a comment around line 50-55 regarding the background positioning values:
Does "Only keywords ..." mean "left", "center", etc. or is there something I missed? The documentation (here at Github) states:
as criteria for the
background-position
value.If I use
left top
instead of0 0
the script errors out, declaring the value ofbackgroundPositionX/Y
as NaN (leaving me with no image at all). After I switched in0 0
the script worked just fine.Is this a mistake or is the documentation outdated/incorrect?
(I didn't try out the minified version, could be that this works fine in that version.)