[Compass Core] Emit less css for inline lists with the same result.

This commit is contained in:
Chris Eppstein 2010-07-09 09:46:24 -07:00
parent 31fc7015d1
commit c60cf4fda5
2 changed files with 14 additions and 20 deletions

View File

@ -2,18 +2,17 @@
@mixin inline-list {
list-style-type: none;
margin: 0px;
padding: 0px;
display: inline;
li {
&, & li {
margin: 0px;
padding: 0px;
display: inline; } }
display: inline;
}
}
// makes an inline list that is comma delimited.
// Please make note of the browser support issues before using this mixin.
//
// use of `:content` and `:after` is not fully supported in all browsers.
// use of `content` and `:after` is not fully supported in all browsers.
// See quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t15)
//
// `:last-child` is not fully supported.
@ -22,8 +21,9 @@
@mixin comma-delimited-list {
@include inline-list;
li {
&:after {
content: ", "; }
&:after { content: ", "; }
&:last-child, &.last {
&:after {
content: ""; } } } }
&:after { content: ""; }
}
}
}

View File

@ -45,21 +45,15 @@ ul.wide-horizontal {
padding-right: 0px; }
ul.inline {
list-style-type: none;
margin: 0px;
padding: 0px;
display: inline; }
ul.inline li {
list-style-type: none; }
ul.inline, ul.inline li {
margin: 0px;
padding: 0px;
display: inline; }
ul.comma {
list-style-type: none;
margin: 0px;
padding: 0px;
display: inline; }
ul.comma li {
list-style-type: none; }
ul.comma, ul.comma li {
margin: 0px;
padding: 0px;
display: inline; }