Lining.js: Controlling Text Lines per CSS Selector

Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
Lining.js: Controlling Text Lines per CSS Selector
The numerous available CSS selectors let us easily access almost each and every HTML element on any given page. The pseudo-element ::first-line even allows us to apply CSS properties to the first line of text in a document, no matter whether the line is automatically or manually wrapped. Unfortunately, besides ::first-line there are no selevtors to manipulate the second, third, last or whichever line. The JavaScript library Lining.js is here to pimp your possibilities. .line[last] Instead of ::last-line Similar to the selectors ::last-child and ::nth-child() that allow you to touch the last or any random child element, Lining.js adds behaiviors for lines of text. INstead of using the (non-existing) selectors ::last-line and ::nth-line(n), the library introduces the classes .line[last] and .line[index="n"]. After having embedded the library into your document, start with assigning the data attribute data-lining to every text element you want to manipulate with Lining.js. THe attribute expects no value. 1 2 3 <p data-lining> Lorem ipsum … </p> Then use these classes to individually markup lines within the text per CSS. 1 2 3 4 5 6 7 p .line[last] { color: red; }   p .line[index="2"] { font-weight: bold; } .line[last] and .line[index="2"] active on a text In […]
via Blogger http://ift.tt/1Je54I0
May 30, 2015 at 09:09AM
via Blogger http://ift.tt/1Fg18AG
May 30, 2015 at 09:09AM
via Blogger http://ift.tt/1JetgtD
May 30, 2015 at 11:18AM
via Blogger http://ift.tt/1J9P23x
May 30, 2015 at 01:24PM
via Blogger http://ift.tt/1Flr8vy
May 30, 2015 at 03:30PM
via Blogger http://ift.tt/1Ja5Gjj
May 30, 2015 at 05:37PM
via Blogger http://ift.tt/1KERvDr
May 30, 2015 at 07:43PM
via Blogger http://ift.tt/1BxSkp6
May 30, 2015 at 09:51PM
via Blogger http://ift.tt/1PVAHvy
May 30, 2015 at 11:58PM
via Blogger http://ift.tt/1JfQFef
May 31, 2015 at 02:05AM
via Blogger http://ift.tt/1KvFTPX
May 31, 2015 at 04:11AM
via Blogger http://ift.tt/1FmdxnH
May 31, 2015 at 06:24AM
via Blogger http://ift.tt/1PW98ly
May 31, 2015 at 08:32AM
via Blogger http://ift.tt/1I1ty5B
May 31, 2015 at 10:39AM
via Blogger http://ift.tt/1SJKio8
May 31, 2015 at 12:46PM
via Blogger http://ift.tt/1HEg79d
May 31, 2015 at 02:53PM
via Blogger http://ift.tt/1HY6TtY
May 31, 2015 at 04:59PM
via Blogger http://ift.tt/1K2Sqw8
May 31, 2015 at 07:05PM
via Blogger http://ift.tt/1M1F8iv
May 31, 2015 at 09:13PM
via Blogger http://ift.tt/1KwKBNt
May 31, 2015 at 11:20PM