TODAY I LEARNED

Comma-Separated Lists

Separate list elements with commas but not the last one:

ul > li:not(:last-child)::after {
  content: ",";
}

Example

  • Hello,
  • There,
  • Comma

Source: AllThingsSmitty

Tweet

Learned by Victor Velazquez on Feb 14, 2021

Discover our latest blog posts
  • #html-css
  • view raw
  • permalink
  • 3 likes
previous TIL next TIL
  • Log in
  • ?

    TIL is an open-source project by MagmaLabs that exists to catalogue the sharing & accumulation of knowledge as it happens day-to-day. Posts have a 200-word limit, and posting is open to any MagmaLaber as well as selected friends of MagmaLabs. We hope you enjoy learning along with us.

    • /wearemagmalabs
  • statistics
  • search
  • Twitter