scroll
scroll copied to clipboard
Improve `class` aftertext directive
The class directive is confusing. I wanted to add 2 classes to a paragraph but I forgot how class works.
It has 2 behaviors:
- If only 1 word is present, adds that class to the parent element
- If 2+ words are present, uses word 2+ as a text selector and adds a span with the class around the matching text.
Behavior 2 was the original behavior but behavior 1 seems to be more useful. Should rethink the design of this, and all similar directives.
A test
class bold padding
Expected:
<p class="bold padding">A test</p>
Actual:
<p class="scrollParagraph">A test</p>