I am currently working on a unique script designed to create a custom number of slices for a circle. The items in the circle are being displayed as shown in this generated circle image. This is the Javascript code I have been using:
for () {
menu.styleSheet += `li:nth-child(${i + 1}) {\n` +
`\ttransform: rotate(${currentDegrees}deg) skewY(${degreeOffset - 90}deg);\n` +
`}\n\n`;
menu.styleSheet += `li:nth-child(${i + 1}) .text {\n` +
`\ttransform: skewY(${90 - degreeOffset}deg) rotate(${degreeOffset / 2}deg);\n` +
`}\n\n`;
currentDegrees += degreeOffset;
}
My current challenge involves ensuring that the numbers (as seen in the provided image) always face upwards, without affecting other elements or shifting the text position. How can I achieve this transformation while keeping the positioning intact and maintaining the overall generated style?