Make capitalized text to render in smallcaps

Hi there! Still trying to learn these CSS thingy. I have some paragraphs in my notes that are written in all caps, like in the picture below.

Does anyone know if it is possible to have this upper case text to be rendered in smallcaps on the fly, instead of the regular font variant, using CSS alone?

  • That is a strange requirement.
  • It is possible to transform some text into smallcaps with CSS alone.
  • But I doubt that detecting capitalized text has anything to do with CSS.

Yes, I figured that much… Thanks for the insight, @mentaloid

I asked Gemini how to do this and it suggested to combine CSS with some javascript. Unfortunately, the provided code did not work.

Any ideas?

  • Linking to garbage doesn’t help.
  • Detecting all-capitals text in Javascript is as simple as str === str.toUpperCase()
  • Transforming with CSS is also simple.
  • Combining those on the fly is complicated.
  • Unfortunately, your requirement is not Logseq-specific.