You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that the performance of WaspLine is a bit slow with large pages, due to how it has to create a <span> element with custom styling for every single character, and then iterate through all of those whenever the user updates a setting.
This adds a background element to each paragraph element containing a rainbow, and then sets the blending mode so that the text color falls through to the background.
If we could just make a span for each line, then we could set a single CSS class for each line (like .waspline-1-left for the first color on the left side, etc.) and change only the CSS when the user wants to update the colors or the gradient size, resulting in some serious speedup.
The text was updated successfully, but these errors were encountered:
Great idea, I've been also wanting to modify the code used by js-line-detector to work correctly with superscripts and underscripts, so this change seems like the perfect opportunity to incorporate both changes.
Edit: One way I thought this could work by using a wider threshold for line separation than the current one, which is really strict. What this would mean is that it would not trigger a line change unless a letter/word is 100% lower than the previous one.
I've noticed that the performance of WaspLine is a bit slow with large pages, due to how it has to create a
<span>
element with custom styling for every single character, and then iterate through all of those whenever the user updates a setting.Here's a page that showcases a neat alternative. It applies a rainbow gradient to the entire block of text by using the following CSS rules:
This adds a background element to each paragraph element containing a rainbow, and then sets the blending mode so that the text color falls through to the background.
If we could just make a span for each line, then we could set a single CSS class for each line (like
.waspline-1-left
for the first color on the left side, etc.) and change only the CSS when the user wants to update the colors or the gradient size, resulting in some serious speedup.The text was updated successfully, but these errors were encountered: