Skip to content

Instantly share code, notes, and snippets.

@Gennnji
Created October 1, 2019 10:20
Show Gist options
  • Save Gennnji/f2e791af9a2c46215ef4dc1b22913e14 to your computer and use it in GitHub Desktop.
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>[email protected]</span>
<!--
Outputs to ===> +7 (985) 171-71-71, [email protected]
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