Skip to content

Instantly share code, notes, and snippets.

@crwang
Last active August 29, 2015 14:03
Show Gist options
  • Save crwang/715d1192e3c64703e720 to your computer and use it in GitHub Desktop.
Save crwang/715d1192e3c64703e720 to your computer and use it in GitHub Desktop.
Unordered list css to csv

Html

<ul class="list-csv">
  <li>one</li>
  <li>two</li>
  <li>three</li>
</ul>

LESS

.list-csv {
    display: inline;
    list-style: none;
    li {
        display: inline;
	    &:after {
	        content:", ";
	    }
	    &:last-child:after {
	        content:""
	    }        
    }
}

CSS

.list-csv {
  display: inline;
  list-style: none;
}
.list-csv li {
  display: inline;
}
.list-csv li:after {
  content: ", ";
}
.list-csv li:last-child:after {
  content: "";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment