This file contains hidden or 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
@function rgbaa($args...) { | |
// rgbaa(#FFF, .5) | |
@if length($args) == 2 { | |
$hex: nth($args, 1); | |
$alpha: nth($args, 2); | |
@if $oldIE == 1 { | |
@return rgb(red($hex), green($hex), blue($hex)); | |
} @else { | |
@return rgba(red($hex), green($hex), blue($hex), $alpha); |
This file contains hidden or 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
%debug | |
background-color: pink !important |
This file contains hidden or 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
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme", | |
"draw_minimap_border": true, | |
"draw_white_space": "all", | |
"font_face": "SourceCodePro-Regular", | |
"font_size": 14.0, | |
"file_exclude_patterns": | |
[ |
This file contains hidden or 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
<script> | |
$(window).resize(function() { | |
var windowWidth = $(window).width(); | |
$('.screen-width').text(windowWidth + 'px'); | |
}); | |
</script> | |
<div id="debug" style="position:fixed;padding:0.3em 0.6em;background:#f1f1f1;font-size:0.6em;bottom:0;left:50%;"> | |
<span class="screen-width">0</span> | |
</div> |
This file contains hidden or 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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
h1 span{ | |
color:Red /* I only target <span> tags nested within a h1 */ | |
} | |
h1 ~ span{ | |
color:blue /* I dont taget <span> tags nest within a h1, but any <span> tag that follows a h1 on the same nested level */ |
This file contains hidden or 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
How to Use | |
Step 1. | |
Copy the custom_widget.php file and place it in your WordPress theme folder. Assuming WordPress is installed in the root of your server the file will be place in /wp-content/themes/yourtheme/ | |
Step 2. | |
Open up functions.php and include the following piece of code somewhere in the file. include TEMPLATEPATH . '/custom_widget.php'; | |
Step 3. | |
Edit the custom_widget.php file to suit your needs. |
This file contains hidden or 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 myfeed_request($qv) { | |
if (isset($qv['feed']) && !isset($qv['post_type'])) | |
$qv['post_type'] = array('post', 'snippets'); | |
return $qv; | |
} | |
add_filter('request', 'myfeed_request'); | |
?> |
This file contains hidden or 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
// Alpha blending | |
@function blend($bg, $fg) { | |
$r: red($fg) * alpha($fg) + red($bg) * (1 - alpha($fg)); | |
$g: green($fg) * alpha($fg) + green($bg) * (1 - alpha($fg)); | |
$b: blue($fg) * alpha($fg) + blue($bg) * (1 - alpha($fg)); | |
@return rgb($r, $g, $b); |
This file contains hidden or 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
//Code for overloading the :contains selector to be case insensitive: | |
//Without the overload on the :contains selector jquery would normaly only underline the second line | |
// New selector | |
jQuery.expr[':'].Contains = function(a, i, m) { | |
return jQuery(a).text().toUpperCase() | |
.indexOf(m[3].toUpperCase()) >= 0; | |
}; | |
// Overwrites old selecor |