This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* LESS mixin for Nash Image Replacement (http://nicolasgallagher.com/css-image-replacement-with-pseudo-elements/) | |
*/ | |
.nir(@image, @width: 100%, @height: 100%) { | |
display: inline-block; overflow: hidden; width: @width; height: @height; | |
&:before { | |
content: url(@image); | |
display: inline-block; line-height: 0; font-size: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ie_rgba(@hex, @alpha:256){ | |
@newhex: `"#" + (Math.round("@{alpha}" * 256)).toString(16) + "@{hex}"`; | |
background: transparent; | |
-ms-filter: ~'"progid:DXImageTransform.Microsoft.gradient(startColorstr=@{newhex},endColorstr=@{newhex})"'; /* IE8 */ | |
filter: ~'progid:DXImageTransform.Microsoft.gradient(startColorstr=@{newhex},endColorstr=@{newhex})'; /* IE6 & 7 */ | |
zoom: 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// type | |
.font-size(@font-size: 16){ | |
@rem: (@font-size / 10); | |
font-size: @font-size * 1px; | |
font-size: ~"@{rem}rem"; } | |
.sans-serif { | |
font-family : "Helvetica Neue", Helvetica, Arial, sans-serif; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Easy Media Queries Shortcodes (w/ LESS) + tester tag</h1> | |
<section> | |
<h2>Media Queries Shortcodes <small>using LESS</small></h2> | |
<p>I've been using this method for writing media queries on a couple of projects now and I'm growing very fond of it. It's pretty simple:</p> | |
<p>Just set your breakpoints via LESS...</p> | |
<pre> | |
// Breakpoints | |
// ------------------------- Source: http://blog.scur.pl/2012/06/variable-media-queries-less-css/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="ss-icon"> | |
<a href="#"><article><span>facebook</span></article></a> | |
<a href="#"><article><span>twitter</span></article></a> | |
<a href="#"><article><span>tumblr</span></article></a> | |
<a href="#"><article><span>pinterest</span></article></a> | |
<a href="#"><article><span>behance</span></article></a> | |
<a href="#"><article><span>github</span></article></a> | |
<a href="#"><article><span>linkedin</span></article></a> | |
<a href="#"><article><span>dribbble</span></article></a> | |
<a href="#"><article><span>instagram</span></article></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="thumb design development "> | |
<div class="thumb-img"> | |
<a class="th" href="#" title="Image for the lightbox" rel="bookmark"> | |
<img src="/wp-content/uploads/2013/07/post-thumbnail-image.jpg" class="attachment-wide-thumb wp-post-image" alt="" /> | |
</a> | |
<div class="caption"> | |
<div> | |
<span>Image caption</span> | |
</div> | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function em_url_spamcheck( $approved , $commentdata ) { | |
return ( strlen( $commentdata['comment_author_url'] ) > 50 ) ? 'spam' : $approved; | |
} | |
add_filter( 'pre_comment_approved', 'em_url_spamcheck', 99, 2 ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function em_remove_comment_fields($fields) { | |
unset($fields['url']); | |
return $fields; | |
} | |
add_filter('comment_form_default_fields','em_remove_comment_fields'); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function em_remove_comment_fields($fields) { | |
unset($fields['url']); | |
return $fields; | |
} | |
add_filter('comment_form_default_fields','em_remove_comment_fields'); | |
function em_url_spamcheck( $approved , $commentdata ) { | |
return ( strlen( $commentdata['comment_author_url'] ) > 1 ) ? 'spam' : $approved; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
remove_filter('comment_text', 'make_clickable', 9); | |
?> |
OlderNewer