Force Sly to use absolute positioning instead of transforms?

Skip to first unread message

Sep 19, 2017, 1:05:00 AM9/19/17
to Sly.js
First of all, sorry for not creating a fiddle, but I don't expect a lot of time, just answer from the top of your head what you think about this. :-)

Qoute from the docs:
"The animation of elements is done by GPU accelerated translate transforms, which rapidly increase the rendering speed in browsers that support it, with absolute positioning fallback for those that don't."

My question is:
Is there any way I could force a specific sly instance to always use the absolute positioning? Could I trick it into believing that transforms are not supported (without affecting other components in the page of course)?
If not, would you consider adding this in as part of the options object, (i.e. allowTransforms, default true)?

My use case is:
I need to put a "position: fixed" element inside each item, to work as a "sticky" header when user scrolls down the page. (i.e. the Sly is horizontal with multiple columns). As of this SO answer having fixed elements inside elements with css transforms is problematic;

(Just to test out my theory I manipulated the testProp function in sly.js to always return false. But then I got another problem, all elements within the sly markup becomes 0 in height, and thus not visible. I'll need to investigate this a bit more, it might just be that I need a different clear fix somewhere, just thought I should mention it.)

Reply all
Reply to author
0 new messages