SplitType icon indicating copy to clipboard operation
SplitType copied to clipboard

Add index CSS variables to lines, words and chars

Open flayks opened this issue 2 years ago • 3 comments

Regarding our discussion @lukePeavey, I gave it a go and implemented this feature as it seemed to be fairly simple for me to try 😄

It works pretty well imo but let me know if things need changes! I also added a setting (true by default, can be put back to false, up to you) to control this behavior

image

flayks avatar Feb 14 '23 11:02 flayks

I just saw that it would cause issues for the indexes when text includes other markup children such as strong or em, like this example: https://lukepeavey.github.io/SplitType/?path=/story/tests-nested-elements--split-lines-words-and-chars

image

This would require more logic and work but I'm afraid this is beyond my skills 🙈

flayks avatar Feb 14 '23 11:02 flayks

Thanks I'll take a look at this over the weekend.

lukePeavey avatar Feb 16 '23 00:02 lukePeavey

@lukePeavey it's been a while since I started this PR, have you had a chance to look at this feature?

flayks avatar Jul 15 '24 21:07 flayks