I am currently working on trying to dynamically change the padding of a group. I know that I could do this using CSS and setting a group ID. The problem is the group is in a repeating group and I need it to be dynamically changed based on the index of a repeating group.
Example:
The group in cell 1 needs 20px padding left
The group in cell 2 needs 40px padding left
…
…
The group in cell X needs 20*Xpx padding left
I played around with this and couldn’t find a way to make padding dynamic; will this be a fixed or controllable number of cells? If so, you could still establish the padding, but you’d have to go index by index, like this:
I kept playing around and found an interesting workaround. There are other ways to approach this, but essentially I’m generating a number of characters with 0% opacity, of font size 20px. The number of characters I generate in each cell is the index of that cell.
FWIW, I’ve done something similar using a space character and a monospaced font. That eliminates the need to set the element or the font color to 0% opacity and also prevents “visible” characters in the source of the page.
I actually just did what I think would be the most effective (so far), with accurate 20px size increase, and not having to rely on transparent text or plugins:
I included a repeating group within the repeating group, with a source of Calculate RandomString, length of characters based on the Current Cell’s Index:
Now the repeating group will be a list of characters. I placed a group of 20px in the RG, with it’s source set to ‘parent’s group text’. I don’t need to use a text element as I never need to show the text.
End result - a group of exactly 20px will appear, increasing +1 additional 20px group per line.
This was a fun challenge! It reminds me of the sort of challenges @adamhholmes was coming up with a few months back.