View Single Post
Old 10-04-2024, 10:35 AM   #40
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,368
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
Quote:
Originally Posted by JSWolf View Post
Personally, I prefer not to use first. I don't like dropcaps or large first letter or smallcaps, etc. I just like normal text unless there's a reason for a style.
You certainly can do it that way, and that is what I was referring to when I mentioned you can be as creative or plain/vanilla as you want.


Quote:
Originally Posted by JSWolf View Post
I don't need a class as I can style h2 + p as needed.
Yes, you can do it this way as well, but it makes the css a bit more unruly. Which do you think is cleaner?

Code:
h2 + p  {}
h2 + p::first-letter {}
h2 + p::first-line {}

-OR-

p.first  {}
p.first::first-letter {}
p.first::first-line {}
Also, you need to consider that there are a lot of books out there that have something inserted between the chapter head and the first paragraph, so a simple h2 + p doesn't work. Whereas, if you get in the habit of semantically labeling the first paragraph, your styling of choice will be appropriately rendered regardless of any intervening elements. Here are a couple of examples:

Click image for larger version

Name:	Screenshot 2024-10-04 101603.png
Views:	201
Size:	172.7 KB
ID:	211193

Click image for larger version

Name:	Screenshot 2024-10-04 101239.png
Views:	204
Size:	456.3 KB
ID:	211194

Click image for larger version

Name:	Screenshot 2024-10-04 101102.png
Views:	224
Size:	457.8 KB
ID:	211195

Quiz Time!
Can you name the Book/Author from the images above? (no cheating)
Spoiler:

image 1: The Long Earth by Terry Pratchett and Stephen Baxter

image 2: The Dragon Reborn by Robert Jordan

image 3: Dune by Frank Herbert
Turtle91 is offline   Reply With Quote