4 ms·
So, just to get this right; to use this script, you'd have to know your content, right down to how many words each text element contains and so forth? The excep
by Haraldson 15y ago
So, just to get this right; to use this script, you'd have to know your content, right down to how many words each text element contains and so forth? The exception being the pairings and repeats. If you already know your content that well (ie. it's static and not any form of user input), you could just add some extra inline elements to your markup, I mean, you're already heavily customizing the text elements.
This is perhaps more elegant, but it makes your CSS too tightly bound to your content. Add a word in the markup, and you'll have to update your CSS as well, with a none or whatnot.
By all means, nice work, I just rarely work with pages where I know how the content will turn out.
Edit: Fixed a typo.
- micheljansen 15y agomy thoughts, some of the examples are way more elegantly solved using markup than with complex CSS rules. That is not to say that you cannot do that with this library: just define a few extra classes and wrap the individual words, letters etc. in spans or something. I think they just went a little overboard with their examples.