Skip to content

Instantly share code, notes, and snippets.

@Gennnji
Created October 1, 2019 10:20
Show Gist options
  • Select an option

  • Save Gennnji/f2e791af9a2c46215ef4dc1b22913e14 to your computer and use it in GitHub Desktop.

Select an option

Save Gennnji/f2e791af9a2c46215ef4dc1b22913e14 to your computer and use it in GitHub Desktop.
[CSS] Dynamical comma
<style>
span:not(:empty) + span:not(:empty):before {
content: ', ';
}
</style>
<span>+7 (985) 171-71-71</span><span>test@mail.mail</span>
<!--
Outputs to ===> +7 (985) 171-71-71, test@mail.mail
It works even for more than 2 elements.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment