I could use outline-offset with a negative value to keep the outline within the confines of the space, but I need to know the dimensions of the piece to finetune it.
It's now doing something along these lines. It first does some testing to determine whether the piece images are padded. If they are padded, it applies a universal outline-offset value of "-3px" to each image in the diagram. If they are not padded, it applies a universal value of "1px" to each image, which keeps the outline from touching the image.
I might also see if I could use outline with a negative outline-offset on the table cell, but I'll look into that tomorrow.
That seems to work, but going with this solution would require more changes to the code.
It's now doing something along these lines. It first does some testing to determine whether the piece images are padded. If they are padded, it applies a universal
outline-offset
value of"-3px"
to each image in the diagram. If they are not padded, it applies a universal value of"1px"
to each image, which keeps the outline from touching the image.That seems to work, but going with this solution would require more changes to the code.