Skip to content

Instantly share code, notes, and snippets.

View zanetaylor's full-sized avatar
👽

Zane Taylor zanetaylor

👽
View GitHub Profile
@zanetaylor
zanetaylor / ie9-empty-transparent-hover-fix.css
Last active January 3, 2016 15:39
IE9 empty & transparent element :hover bug workaround
background: rgba(0, 0, 0, 0);
@zanetaylor
zanetaylor / caret.scss
Last active December 22, 2015 20:49
SASS caret mixin
@mixin caret($point, $border-width, $color) {
$opposite: opposite-position($point);
border: $border-width solid transparent;
border-#{$opposite}: $border-width solid $color;
border-#{$point}: 0;
height: 0;
width: 0;
}
ul {
list-style: none;
li {
padding-left: 1em;
text-indent: -.7em;
}
li:before {
content: "\002022";
/* ********************
* Limit post excerpts. Within theme files used as
* print string_limit_words(get_the_excerpt(), 20);
******************************************************************** */
function string_limit_words($string, $word_limit) { $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) array_pop($words); return implode(' ', $words); }