View Single Post
Old 06-28-2018, 06:55 PM   #33
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,369
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
...FWIW...just throwing in my .02 cents.

If you are using a newer device then it'll likely support pseudo-elements. This makes the CSS and tags much simpler - see below. Of course you can adjust the CSS as desired for your preferences and it sometimes isn't supported by older devices. Also, IMHO, it doesn't treat leading punctuation as well as I'd like. Leading punctuation follows the same styling as the initial letter itself. eg. An open quote symbol would be 3 times as large (font-size:3em) /bold/italic etc as the first letter. I'm used to it, but it would be nice to have a built-in styling option for that frequent occurrence.

Code:
/* First Para in lieu of Drop Caps */
p.first               {text-indent:0; font-size:1em; line-height:1; clear:both}
p.first::first-letter {font-family:serif; font-size:3em; font-weight:bold; float:left;
                       margin:-.1em .05em -.1em .1em}
p.first::first-line   {font-variant:small-caps; font-size:1.15em}


HTML:
<p class="first">Just type a normal first paragraph without the requirement to add
&lt;span&gt; tags. The device will automagically adjust formatting to apply
only to the first-letter and first-line of the paragraph - no matter how wide 
the display is, only the first line is small caps.</p>
Attached Thumbnails
Click image for larger version

Name:	drop.PNG
Views:	419
Size:	16.7 KB
ID:	164719  

Last edited by Turtle91; 06-28-2018 at 07:01 PM.
Turtle91 is offline   Reply With Quote