| 1 |
// Turn off the bullet for an element of a list |
| 2 |
@mixin no-bullet { |
| 3 |
list-style-image : none; |
| 4 |
list-style-type : none; |
| 5 |
margin-left : 0; |
| 6 |
} |
| 7 |
|
| 8 |
// turns off the bullets for an entire list |
| 9 |
@mixin no-bullets { |
| 10 |
list-style: none; |
| 11 |
li { @include no-bullet; } |
| 12 |
} |
| 13 |
|
| 14 |
// Make a list(ul/ol) have an image bullet. |
| 15 |
// |
| 16 |
// The mixin should be used like this for an icon that is 5x7: |
| 17 |
// |
| 18 |
// ul.pretty |
| 19 |
// +pretty-bullets("my-icon.png", 5px, 7px) |
| 20 |
// |
| 21 |
// Additionally, if the image dimensions are not provided, |
| 22 |
// The image dimensions will be extracted from the image itself. |
| 23 |
// |
| 24 |
// ul.pretty |
| 25 |
// +pretty-bullets("my-icon.png") |
| 26 |
// |
| 27 |
@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) { |
| 28 |
margin-left: 0; |
| 29 |
li { |
| 30 |
padding-left: $padding; |
| 31 |
background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2; |
| 32 |
list-style-type: none; |
| 33 |
} |
| 34 |
} |