SarahSWD Posted December 21, 2021 Posted December 21, 2021 Site URL: https://tangerine-tiger-4ty6.squarespace.com/ Hi, For some strange reason one of the font I've picked doesn't automatically come up in sentence case but only lower case. I've found the code to force it to be in upper case but not to have it in sentence case (= only first letter of each sentence in uppercase). The font is a font available on Squarespace called Dancing script. Currently using it for my H2 & H4. Note: H1 & H3 are forced in uppercase which is what I want for that font 😉 Does anyone know how to add code to my custom css please to have the sentence case on my h2 and h4 script font please? Thanks, Sarah
Beyondspace Posted December 21, 2021 Posted December 21, 2021 29 minutes ago, SarahSWD said: Site URL: https://tangerine-tiger-4ty6.squarespace.com/ Hi, For some strange reason one of the font I've picked doesn't automatically come up in sentence case but only lower case. I've found the code to force it to be in upper case but not to have it in sentence case (= only first letter of each sentence in uppercase). The font is a font available on Squarespace called Dancing script. Currently using it for my H2 & H4. Note: H1 & H3 are forced in uppercase which is what I want for that font 😉 Does anyone know how to add code to my custom css please to have the sentence case on my h2 and h4 script font please? Thanks, Sarah Your site is private now. Kindly set it with the protected password to check you issue together BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Solution iamdavehart Posted December 21, 2021 Solution Posted December 21, 2021 CSS doesn't have a native sentence case as part of its text-transform property (it only has upper, lower and capitalize), but you can use the ::first-letter pseudo-selector to help you out. This won't be "true" sentence case insofar as it won't respect multiple sentences in a single block, but should be good enough for headings. so, if you type all your h2 and h4 headings as lowercase then you can style them as sentence case using the code that follows (don't need the style tags if you're putting it in your custom css): <style> h2,h4 { text-transform: lowercase; } h2::first-letter, h4::first-letter { text-transform: uppercase } </style> examples of all text-transform options: SarahSWD 1 Dave Hart. Software/Technology Consultant living in London. buymeacoffee
Tahlia Posted May 10, 2022 Posted May 10, 2022 @iamdavehart I have had the same issue but it is for a short quote/paragraph. Is there a way to make each first letter of each sentence begin with a capital? Thanks
creedon Posted May 10, 2022 Posted May 10, 2022 @Tahlia Please post the URL for a page on your site where we can see your issue. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the documentation at the link provided to understand how it works. Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. We can then take a look at your issue. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment