View Single Post
Old 08-17-2023, 09:58 AM   #90
nabsltd
Fanatic
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 524
Karma: 8500000
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
Quote:
Originally Posted by JSWolf View Post
The correct CSS for smallcaps is...
Code:
text-transform: uppercase;
font-variant: small-caps;
You need the text top be uppercase before it can be converted to smallcaps.
Your post is completely backwards from reality:
https://www.w3schools.com/cssref/pr_...nt-variant.php

For an example:
https://jsfiddle.net/m5cjpq3t/1/

Basically, lowercase letters get changed to small uppercase by font-variant: small-caps and uppercase letters are untouched. If you want every character in the span to be small caps, you need to convert them to lowercase first.

What has likely confused you is that you see the following in a lot of eBooks to simulate small caps:
Code:
<p>The sign read <small>OPEN</small></p>

Last edited by nabsltd; 08-17-2023 at 10:00 AM.
nabsltd is offline   Reply With Quote