Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rework two-color-word effect & implement blinking
Instead of overlaying a half of the two-color-word character, the two-color-word effect is now achieved by using two half-word pseudo elements (enabled by CSS class .o), one for the left half (::before; controlled by non-prefixed CSS classes) and one for the right half (::after; controlled by CSS classes prefixed with 'r'), so that the two halves of the word can be controlled independently. Additionally, to make the text selection appear normal, the real element is made invisible and placed on top of the pseudo elements. This greatly reduces the number of CSS classes needed. See Ptt-official-app/pttbbs-web#122 for an explanation of a similar implementation. The blink effect for two-color-word characters is also implemented. The background color was dependent on both .b<bg> and .qq<bg> classes, which complicated the TwoColorWord blinking implementation. Therefore, the .qq<bg> classes are removed, while only the .qq class is left since it does not affect the background color. Since the color of two-color-word characters is now transparent, the color of hovered hyperlinks is now explicitly assigned as the color of q7 to prevent the link text with the two-color-word effect from being invisible.
- Loading branch information