Huy's Notes
CSS - Sentence case

CSS - Sentence case

#ui

Sentence case is the transformation style that make only the first character capitalized. We don't have the built in style for this case in CSS. Instead, we can use ::first-letter pseudo element to handle it, like this:

.sentence-case {
  text-transform: lowercase;
  &::first-letter {
    text-transform: uppercase;
  }
}

Unfortunately, some mobile browsers do not support ::first-letter.

Referred in


If you think this note resonated, be it positive or negative, please feel free to send me an email and we can talk.